summaryrefslogtreecommitdiff
path: root/sysdeps/linux/procargs.c
diff options
context:
space:
mode:
authorMartin Baulig <martin@src.gnome.org>2000-02-14 14:25:34 +0000
committerMartin Baulig <martin@src.gnome.org>2000-02-14 14:25:34 +0000
commit00a32c887cfc3f0ad85e6a3ec4ca91ac5c9431a0 (patch)
tree607d4afbb5720306067be0f2579a125025f2b951 /sysdeps/linux/procargs.c
parentc92bf0f9a9106d8e6ca33f2edbbf5e56ea2b5bb4 (diff)
downloadlibgtop-00a32c887cfc3f0ad85e6a3ec4ca91ac5c9431a0.tar.gz
Make sure we close all open files.
Diffstat (limited to 'sysdeps/linux/procargs.c')
-rw-r--r--sysdeps/linux/procargs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/linux/procargs.c b/sysdeps/linux/procargs.c
index 86d4cfb1..9ff15cab 100644
--- a/sysdeps/linux/procargs.c
+++ b/sysdeps/linux/procargs.c
@@ -65,6 +65,7 @@ glibtop_get_proc_args_s (glibtop *server, glibtop_array *array, pid_t pid)
while (1) {
len = read (cmdline, buffer, BUFSIZ-1);
if (len < 0) {
+ close (cmdline);
glibtop_free_r (server, ptr);
return NULL;
}