talloc: setup the new 'tc' before TC_UNDEFINE_GROW_CHUNK() _talloc_realloc()
authorStefan Metzmacher <metze@samba.org>
Tue, 17 May 2011 06:19:04 +0000 (08:19 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 17 May 2011 06:22:23 +0000 (08:22 +0200)
metze

lib/talloc/talloc.c

index f3ed9c85672679f11a7c1d734510930062fd8108..95534052bc85d2c99680976acad1567c4fcc82d6 100644 (file)
@@ -1512,6 +1512,7 @@ _PUBLIC_ void *_talloc_realloc(const void *context, void *ptr, size_t size, cons
                                memmove(pool_tc->pool, tc, old_used);
                                new_ptr = pool_tc->pool;
 
+                               tc = (struct talloc_chunk *)new_ptr;
                                TC_UNDEFINE_GROW_CHUNK(tc, size);
 
                                /*