Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-06-23 17:45:49 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-06-23 17:45:49 +0400
commit6950fc18e3676594fcfccae9dd470603692d26ef (patch)
tree81324be4ddb75050a6f77f345aed199e8874162c /winsup/cygwin/malloc_wrapper.cc
parent28b4c8483efc8b3c4f2860a590e719445e5daf36 (diff)
* malloc_wrapper.cc (mallinfo): Initialize m if external malloc is used,
too (CID 60120).
Diffstat (limited to 'winsup/cygwin/malloc_wrapper.cc')
-rw-r--r--winsup/cygwin/malloc_wrapper.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/malloc_wrapper.cc b/winsup/cygwin/malloc_wrapper.cc
index 17347ae3d..68c851440 100644
--- a/winsup/cygwin/malloc_wrapper.cc
+++ b/winsup/cygwin/malloc_wrapper.cc
@@ -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 ();