Fix memory leak of cwd string in emacsclient (Bug#26628)
* lib-src/emacsclient.c (main): emacsclient retrieves the current working directory using get_current_dir_name which returns a newly allocated string. Make sure this string is freed before exiting. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
28445aee59
commit
c221f1466e
1 changed files with 2 additions and 0 deletions
|
@ -1945,6 +1945,8 @@ main (int argc, char **argv)
|
|||
if (rl < 0)
|
||||
exit_status = EXIT_FAILURE;
|
||||
|
||||
free (cwd); /* Keep leak checkers happy. */
|
||||
|
||||
CLOSE_SOCKET (emacs_socket);
|
||||
return exit_status;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue