]> sourceware.org Git - newlib-cygwin.git/commitdiff
* malloc_wrapper.cc (mallinfo): Initialize m if external malloc is used,
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 23 Jun 2014 13:45:49 +0000 (13:45 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 23 Jun 2014 13:45:49 +0000 (13:45 +0000)
too (CID 60120).

winsup/cygwin/ChangeLog
winsup/cygwin/malloc_wrapper.cc

index 40656fcda658e3f7e699e2989fdc35da8c4b281e..115b697d6b7fc599a54515b917d03cde9d002f0f 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-23  Corinna Vinschen  <corinna@vinschen.de>
+
+       * malloc_wrapper.cc (mallinfo): Initialize m if external malloc is used,
+       too (CID 60120).
+
 2014-06-23  Corinna Vinschen  <corinna@vinschen.de>
 
        * localtime.cc (tzload): Fix leaking memory (CID 60001).
index 17347ae3dd21fcbaefcb98837be51f6fd0225ef3..68c851440afece3db8da10bcbdc44d6d0201efc1 100644 (file)
@@ -241,7 +241,10 @@ mallinfo ()
 {
   struct mallinfo m;
   if (!use_internal)
-    set_errno (ENOSYS);
+    {
+      memset (&m, 0, sizeof m);
+      set_errno (ENOSYS);
+    }
   else
     {
       __malloc_lock ();
This page took 0.043971 seconds and 5 git commands to generate.