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.
This commit is contained in:
Dan Robertson 2018-02-11 20:08:56 +00:00
parent 4a76d06f33
commit 15f9c89e84
No known key found for this signature in database
GPG key ID: 45C4A652C47E42A5
3 changed files with 6 additions and 5 deletions

View file

@ -96,6 +96,7 @@ pid_t get_parent_pid(pid_t child) {
parent = strtol(token, NULL, 10);
}
free(buffer);
fclose(stat);
}