* malloc_wrapper.cc (mallinfo): Initialize m if external malloc is used,

too (CID 60120).
This commit is contained in:
Corinna Vinschen 2014-06-23 13:45:49 +00:00
parent 28b4c8483e
commit 6950fc18e3
2 changed files with 9 additions and 1 deletions

View 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).

View 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 ();