diff options
author | 2018-02-11 20:08:56 +0000 | |
---|---|---|
committer | 2018-02-11 20:45:06 +0000 | |
commit | 15f9c89e8427aa7cdf97061a2bda89d8403e4fba (patch) | |
tree | 53af848863a7a5d0ecc13d87c270ff960272aaeb /common/util.c | |
parent | Merge pull request #1591 from dlrobertson/fix_mem_errors (diff) | |
download | sway-15f9c89e8427aa7cdf97061a2bda89d8403e4fba.tar.gz sway-15f9c89e8427aa7cdf97061a2bda89d8403e4fba.tar.zst sway-15f9c89e8427aa7cdf97061a2bda89d8403e4fba.zip |
Fix more leaks
- get_parent_pid: free buffer returned from read_line after use.
- workspace_for_pid: ensure free_pid_workspace is called when
pid_workspaces are removed from config->pid_workspaces.
- cmd_split: return the cmd_results from _do_split, so that the
parent function may free it.
Diffstat (limited to 'common/util.c')
-rw-r--r-- | common/util.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/util.c b/common/util.c index d6369853..38ac9367 100644 --- a/common/util.c +++ b/common/util.c | |||
@@ -96,6 +96,7 @@ pid_t get_parent_pid(pid_t child) { | |||
96 | parent = strtol(token, NULL, 10); | 96 | parent = strtol(token, NULL, 10); |
97 | } | 97 | } |
98 | 98 | ||
99 | free(buffer); | ||
99 | fclose(stat); | 100 | fclose(stat); |
100 | } | 101 | } |
101 | 102 | ||