diff options
Diffstat (limited to 'malloc/mtrace.c')
-rw-r--r-- | malloc/mtrace.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/malloc/mtrace.c b/malloc/mtrace.c index af3b7f8ada..e9ccfa299d 100644 --- a/malloc/mtrace.c +++ b/malloc/mtrace.c @@ -219,8 +219,13 @@ tr_reallochook (ptr, size, caller) tr_where (caller, info); if (hdr == NULL) - /* Failed realloc. */ - fprintf (mallstream, "! %p %#lx\n", ptr, (unsigned long int) size); + { + if (size != 0) + /* Failed realloc. */ + fprintf (mallstream, "! %p %#lx\n", ptr, (unsigned long int) size); + else + fprintf (mallstream, "- %p\n", ptr); + } else if (ptr == NULL) fprintf (mallstream, "+ %p %#lx\n", hdr, (unsigned long int) size); else |