2007-05-18 Ulrich Drepper <drepper@redhat.com>
+ * malloc/mcheck.c (reallochook): If size==0, free the block.
+
* rt/tst-shm.c: Use fstat64 instead of fstat.
* sysdeps/unix/sysv/linux/i386/sync_file_range.S: Fix case where
/* Standard debugging hooks for `malloc'.
- Copyright (C) 1990-1997,99,2000,01,02 Free Software Foundation, Inc.
+ Copyright (C) 1990-1997,1999,2000-2002,2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written May 1989 by Mike Haertel.
static __ptr_t
reallochook (__ptr_t ptr, __malloc_size_t size, const __ptr_t caller)
{
+ if (size == 0)
+ {
+ freehook (ptr, caller);
+ return;
+ }
+
struct hdr *hdr;
__malloc_size_t osize;