1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

(tr_freehook): Return immediately if ptr is NULL.

This commit is contained in:
Ulrich Drepper
2000-07-13 18:40:43 +00:00
parent fe97f9746a
commit 55465bd987

View File

@@ -1,5 +1,5 @@
/* More debugging hooks for `malloc'. /* More debugging hooks for `malloc'.
Copyright (C) 1991,92,93,94,96,97,98,99 Free Software Foundation, Inc. Copyright (C) 1991,92,93,94,96,97,98,99,2000 Free Software Foundation, Inc.
Written April 2, 1991 by John Gilmore of Cygnus Support. Written April 2, 1991 by John Gilmore of Cygnus Support.
Based on mcheck.c by Mike Haertel. Based on mcheck.c by Mike Haertel.
@@ -127,6 +127,8 @@ tr_freehook (ptr, caller)
__ptr_t ptr; __ptr_t ptr;
const __ptr_t caller; const __ptr_t caller;
{ {
if (ptr == NULL)
return;
__libc_lock_lock (lock); __libc_lock_lock (lock);
tr_where (caller); tr_where (caller);
/* Be sure to print it first. */ /* Be sure to print it first. */