]> granicus.if.org Git - procps-ng/commitdiff
read_cmdline should close files -- thanks Jim
authoralbert <>
Sat, 28 Dec 2002 09:37:42 +0000 (09:37 +0000)
committeralbert <>
Sat, 28 Dec 2002 09:37:42 +0000 (09:37 +0000)
proc/readproc.c

index 356c6a687fbcfabaab0642cebb672ef6536e496a..4811baba2dd8e0ca408fecc0636185144832c981 100644 (file)
@@ -318,6 +318,7 @@ int read_cmdline(char *restrict const dst, unsigned sz, unsigned pid){
         if(n==sz) break; // filled the buffer
         if(r==0) break;  // EOF
     }
+    close(fd);
     if(n){
         int i;
         if(n==sz) n--;