about summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-12-09 23:43:13 +0000
committerUlrich Drepper <drepper@redhat.com>1997-12-09 23:43:13 +0000
commitd0479b8e4106796c0c578b3a805ac66aa3ee69b6 (patch)
tree51d6f780862bdcd20ab71f6f3c93d52ab3edddd5 /malloc
parent028e4ac4ac283afea6434576e9cb0760122a7fee (diff)
downloadglibc-d0479b8e4106796c0c578b3a805ac66aa3ee69b6.tar.gz
glibc-d0479b8e4106796c0c578b3a805ac66aa3ee69b6.tar.xz
glibc-d0479b8e4106796c0c578b3a805ac66aa3ee69b6.zip
(malloc_update_mallinfo): Initialize struct for return value.
Diffstat (limited to 'malloc')
-rw-r--r--malloc/malloc.c3
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;