diff options
author | K.Takata <kentkt@csc.jp> | 2022-09-08 10:55:38 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-08 10:55:38 +0100 |
commit | b0d12e63e8c763ce940dc4c162111fedde2507ef (patch) | |
tree | 87497d100b3ce25a2bb1d617093ec6e369791fbb /src/clientserver.c | |
parent | e5a420fb33518e08313f653f3031bc36f949e086 (diff) | |
download | vim-git-b0d12e63e8c763ce940dc4c162111fedde2507ef.tar.gz |
patch 9.0.0413: ASAN reports a memory leakv9.0.0413
Problem: ASAN reports a memory leak.
Solution: Free the string received from the server. (Ken Takata,
closes #11080)
Diffstat (limited to 'src/clientserver.c')
-rw-r--r-- | src/clientserver.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/clientserver.c b/src/clientserver.c index bb2108d7d..eaaba2572 100644 --- a/src/clientserver.c +++ b/src/clientserver.c @@ -423,9 +423,7 @@ cmdsrv_main( if (argtype == ARGTYPE_EDIT_WAIT) { int numFiles = *argc - i - 1; - int j; char_u *done = alloc(numFiles); - char_u *p; # ifdef FEAT_GUI_MSWIN NOTIFYICONDATA ni; int count = 0; @@ -450,6 +448,8 @@ cmdsrv_main( vim_memset(done, 0, numFiles); while (memchr(done, 0, numFiles) != NULL) { + char_u *p; + int j; # ifdef MSWIN p = serverGetReply(srv, NULL, TRUE, TRUE, 0); if (p == NULL) @@ -459,6 +459,7 @@ cmdsrv_main( break; # endif j = atoi((char *)p); + vim_free(p); if (j >= 0 && j < numFiles) { # ifdef FEAT_GUI_MSWIN |