1
0
mirror of https://sourceware.org/git/glibc.git synced 2026-01-06 11:51:29 +03:00

Optimize tr_freehook

This commit is contained in:
Ulrich Drepper
2011-12-22 11:38:32 -05:00
parent b7763303bf
commit 4104316861
3 changed files with 12 additions and 6 deletions

View File

@@ -146,10 +146,12 @@ tr_freehook (ptr, caller)
tr_where (caller, info);
/* Be sure to print it first. */
fprintf (mallstream, "- %p\n", ptr);
__libc_lock_unlock (lock);
if (ptr == mallwatch)
tr_break ();
__libc_lock_lock (lock);
{
__libc_lock_unlock (lock);
tr_break ();
__libc_lock_lock (lock);
}
__free_hook = tr_old_free_hook;
if (tr_old_free_hook != NULL)
(*tr_old_free_hook) (ptr, caller);