mirror of
https://github.com/swaywm/sway.git
synced 2024-11-10 20:44:01 +01:00
get_parent_pid: fix memory leak
Found through static analysis.
This commit is contained in:
parent
0c6149171b
commit
f0d1d26320
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user