about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-07-13 09:50:03 +0000
committerAndreas Jaeger <aj@suse.de>2000-07-13 09:50:03 +0000
commit600b77a696880edf962899ddee52663c76727fb3 (patch)
tree7715e6731eff6a0ca4969029751ebba8da689c9f /sysdeps
parent405b8c60d0b63d21f3a1e185eddc321c842b5a9d (diff)
downloadglibc-600b77a696880edf962899ddee52663c76727fb3.tar.gz
glibc-600b77a696880edf962899ddee52663c76727fb3.tar.xz
glibc-600b77a696880edf962899ddee52663c76727fb3.zip
(free_mem): Only free memory if it was allocated.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/getsysstats.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c
index a4113ce661..9d0137678f 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);