lib: talloc: Fix bug when calling a destructor.
commit8194d069e55914710656abc8fb9d16a1fb24eb1c
authorJeremy Allison <jra@samba.org>
Thu, 5 Mar 2015 20:48:47 +0000 (5 12:48 -0800)
committerKarolin Seeger <kseeger@samba.org>
Sun, 15 Mar 2015 21:14:08 +0000 (15 22:14 +0100)
tree2e042a7e99b2b17a5e468d8fc1ea1a183bc32f3d
parent6640cfa7594c2e3897d2186d5f0345cdeb11d987
lib: talloc: Fix bug when calling a destructor.

If the destructor itself calls talloc_set_destructor()
and returns -1, the new destructor set is overwritten
by talloc.

Dectect that and leave the new destructor in place.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
(cherry picked from commit 3289a5d84f73bf044e5767a6c47a3f7bf8357c08)
lib/talloc/talloc.c