diff options
author | Anders Waldenborg <anders@0x63.nu> | 2017-04-23 21:15:46 +0200 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2017-05-31 22:58:30 -0400 |
commit | c221f1466ed7e0f11f142d9cb3c0247b10e511c6 (patch) | |
tree | a49bcd9b7b917679047a8cf5ace0422d9995747a | |
parent | 28445aee59d54a8560aa4f33fa50f225b54317dc (diff) | |
download | emacs-c221f1466ed7e0f11f142d9cb3c0247b10e511c6.tar.gz |
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
-rw-r--r-- | lib-src/emacsclient.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index c21ee6bd395..3a0715f137e 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -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; } |