diff options
-rw-r--r-- | malloc/malloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c index 9d4d03c073..ea92acb323 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -3637,6 +3637,9 @@ malloc_update_mallinfo(ar_ptr, mi) arena *ar_ptr; struct mallinfo *mi; #endif INTERNAL_SIZE_T avail; + /* Initialize the memory. */ + memset (mi, '\0', sizeof (struct mallinfo)); + (void)mutex_lock(&ar_ptr->mutex); avail = chunksize(top(ar_ptr)); navail = ((long)(avail) >= (long)MINSIZE)? 1 : 0; |