comparison src/alloc.c @ 78811:6ebdc9c66c94

(reset_malloc_hooks): Set the hooks to the previous values instead of zapping them.
author Andreas Schwab <schwab@suse.de>
date Sun, 16 Sep 2007 09:40:45 +0000
parents 5d078cae9374
children fc2bcd2a8aad
comparison
equal deleted inserted replaced
78810:fef9f4017de1 78811:6ebdc9c66c94
1340 calls malloc because it is the first call, and we have an endless loop. */ 1340 calls malloc because it is the first call, and we have an endless loop. */
1341 1341
1342 void 1342 void
1343 reset_malloc_hooks () 1343 reset_malloc_hooks ()
1344 { 1344 {
1345 __free_hook = 0; 1345 __free_hook = old_free_hook;
1346 __malloc_hook = 0; 1346 __malloc_hook = old_malloc_hook;
1347 __realloc_hook = 0; 1347 __realloc_hook = old_realloc_hook;
1348 } 1348 }
1349 #endif /* HAVE_GTK_AND_PTHREAD */ 1349 #endif /* HAVE_GTK_AND_PTHREAD */
1350 1350
1351 1351
1352 /* Called from main to set up malloc to use our hooks. */ 1352 /* Called from main to set up malloc to use our hooks. */