Explorar el Código

Merge branch 'check_proc_1203'

(Closes #1371)
(Closes #1203)
Jan Wagner hace 10 años
padre
commit
25e6f5efaf
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      plugins-root/pst3.c

+ 3 - 1
plugins-root/pst3.c

@@ -139,8 +139,10 @@ try_again:
     if((ps_fd = open(ps_name, O_RDONLY)) == -1)
       continue;
 
-    if((as_fd = open(as_name, O_RDONLY)) == -1)
+    if((as_fd = open(as_name, O_RDONLY)) == -1) {
+      close(ps_fd);
       continue;
+    }
 
     if(read(ps_fd, &psinfo, sizeof(psinfo)) != sizeof(psinfo)) {
       int err = errno;