talloc_stack: reset stackframe pointers to NULL
authorStefan Metzmacher <metze@samba.org>
Mon, 15 Mar 2010 13:39:11 +0000 (14:39 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 29 Mar 2010 07:41:04 +0000 (09:41 +0200)
This makes it easier to debug the code in future.

metze
(cherry picked from commit d23581b4d7a4936002c1d2d748836aead9215120)
(cherry picked from commit 29eb47bdaf9a80e819c30e4c1fac9d07040d32bc)

lib/util/talloc_stack.c

index 58d22e378a6ea40d07159773909aef3a392102c5..f34d495294a6fce9e0483968a5d6177070cd3aee 100644 (file)
@@ -103,8 +103,10 @@ static int talloc_pop(TALLOC_CTX *frame)
                        break;
                }
                talloc_free(ts->talloc_stack[i]);
+               ts->talloc_stack[i] = NULL;
        }
 
+       ts->talloc_stack[i] = NULL;
        ts->talloc_stacksize = i;
        return 0;
 }