get_parent_pid: fix memory leak

Found through static analysis.
This commit is contained in:
Dominique Martinet 2018-07-01 23:06:40 +09:00
parent 0c6149171b
commit f0d1d26320

View File

@ -95,7 +95,7 @@ pid_t get_parent_pid(pid_t child) {
token = strtok(NULL, sep); // parent pid
parent = strtol(token, NULL, 10);
}
free(buffer);
fclose(stat);
}