* 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> 2014-06-23 Corinna Vinschen <corinna@vinschen.de>
* localtime.cc (tzload): Fix leaking memory (CID 60001). * localtime.cc (tzload): Fix leaking memory (CID 60001).

View File

@ -241,7 +241,10 @@ mallinfo ()
{ {
struct mallinfo m; struct mallinfo m;
if (!use_internal) if (!use_internal)
{
memset (&m, 0, sizeof m);
set_errno (ENOSYS); set_errno (ENOSYS);
}
else else
{ {
__malloc_lock (); __malloc_lock ();