Revert "talloc: abort in talloc_unlink with a wrong parent"
authorStefan Metzmacher <metze@samba.org>
Tue, 10 Jan 2012 09:28:55 +0000 (10:28 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 10 May 2012 16:46:58 +0000 (18:46 +0200)
This reverts commit 923b8e9e01bbe7858d0710026168c83a53ba285c.

lib/talloc/talloc.c

index ccf7f5c5de99c82659c8f7428c8348da14f55cff..e5fd0d28232a654749b020e5e5c4bec100f31a0b 100644 (file)
@@ -1037,16 +1037,6 @@ static inline int talloc_unreference(const void *context, const void *ptr)
        return _talloc_free_internal(h, __location__);
 }
 
-static void talloc_abort_unlink_invalid_parent(void)
-{
-       talloc_abort("Bad talloc parent for talloc_unlink");
-}
-
-static void talloc_abort_unlink_internal_error(void)
-{
-       talloc_abort("internal error in talloc_unlink");
-}
-
 /*
   remove a specific parent context from a pointer. This is a more
   controlled variant of talloc_free()
@@ -1074,7 +1064,6 @@ _PUBLIC_ int talloc_unlink(const void *context, void *ptr)
                tc_c = NULL;
        }
        if (tc_c != talloc_parent_chunk(ptr)) {
-               talloc_abort_unlink_invalid_parent();
                return -1;
        }
        
@@ -1092,7 +1081,6 @@ _PUBLIC_ int talloc_unlink(const void *context, void *ptr)
        }
 
        if (talloc_unreference(new_parent, ptr) != 0) {
-               talloc_abort_unlink_internal_error();
                return -1;
        }