aboutsummaryrefslogtreecommitdiff
path: root/malloc/mtrace.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-13 18:40:43 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-13 18:40:43 +0000
commit55465bd98789c10d259c31a757ea13c06e78233d (patch)
tree269e3653d459dfba7b46fd84acd210a3ac345ee9 /malloc/mtrace.c
parentfe97f9746a967fa0f89dad54f59c143482af812d (diff)
downloadglibc-55465bd98789c10d259c31a757ea13c06e78233d.zip
glibc-55465bd98789c10d259c31a757ea13c06e78233d.tar.gz
glibc-55465bd98789c10d259c31a757ea13c06e78233d.tar.bz2
(tr_freehook): Return immediately if ptr is NULL.
Diffstat (limited to 'malloc/mtrace.c')
-rw-r--r--malloc/mtrace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
index 4e6e1e5..a812dd1 100644
--- a/malloc/mtrace.c
+++ b/malloc/mtrace.c
@@ -1,5 +1,5 @@
/* 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.
Based on mcheck.c by Mike Haertel.
@@ -127,6 +127,8 @@ tr_freehook (ptr, caller)
__ptr_t ptr;
const __ptr_t caller;
{
+ if (ptr == NULL)
+ return;
__libc_lock_lock (lock);
tr_where (caller);
/* Be sure to print it first. */