mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 07:56:31 +01:00
get_parent_pid: fix memory leak
Found through static analysis.
This commit is contained in:
parent
0c6149171b
commit
f0d1d26320
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ pid_t get_parent_pid(pid_t child) {
|
||||||
token = strtok(NULL, sep); // parent pid
|
token = strtok(NULL, sep); // parent pid
|
||||||
parent = strtol(token, NULL, 10);
|
parent = strtol(token, NULL, 10);
|
||||||
}
|
}
|
||||||
|
free(buffer);
|
||||||
fclose(stat);
|
fclose(stat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue