lib: talloc: Fix bug when calling a destructor.
authorJeremy Allison <jra@samba.org>
Thu, 5 Mar 2015 20:48:47 +0000 (12:48 -0800)
committerJeremy Allison <jra@samba.org>
Sun, 8 Mar 2015 17:24:06 +0000 (18:24 +0100)
commit3289a5d84f73bf044e5767a6c47a3f7bf8357c08
treeb231566d9d0082f792952f696a3af69ad9351935
parente53f6e9ec2eb05ded39a0caec407bb3bb23039cf
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>
lib/talloc/talloc.c