chiark / gitweb /
util: fix bad memory access
authorLennart Poettering <lennart@poettering.net>
Thu, 17 Jan 2013 16:38:00 +0000 (17:38 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 17 Jan 2013 16:38:13 +0000 (17:38 +0100)
src/shared/util.c

index 0161f3e..8e14096 100644 (file)
@@ -439,7 +439,6 @@ int get_parent_of_pid(pid_t pid, pid_t *_ppid) {
 
         if (!fgets(line, sizeof(line), f)) {
                 r = feof(f) ? -EIO : -errno;
-                fclose(f);
                 return r;
         }