From: Andreas Jaeger Date: Thu, 13 Jul 2000 09:50:03 +0000 (+0000) Subject: (free_mem): Only free memory if it was allocated. X-Git-Tag: upstream/2.20~18140 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=600b77a696880edf962899ddee52663c76727fb3;p=platform%2Fupstream%2Flinaro-glibc.git (free_mem): Only free memory if it was allocated. --- diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c index a4113ce..9d01376 100644 --- a/sysdeps/unix/sysv/linux/getsysstats.c +++ b/sysdeps/unix/sysv/linux/getsysstats.c @@ -283,6 +283,7 @@ weak_alias (__get_avphys_pages, get_avphys_pages) static void free_mem (void) { - free (mount_proc); + if (mount_proc != NULL) + free (mount_proc); } text_set_element (__libc_subfreeres, free_mem);