changeset 30154:9137d2bc93bf v9.0.0413

patch 9.0.0413: ASAN reports a memory leak Commit: https://github.com/vim/vim/commit/b0d12e63e8c763ce940dc4c162111fedde2507ef Author: K.Takata <kentkt@csc.jp> Date: Thu Sep 8 10:55:38 2022 +0100 patch 9.0.0413: ASAN reports a memory leak Problem: ASAN reports a memory leak. Solution: Free the string received from the server. (Ken Takata, closes #11080)
author Bram Moolenaar <Bram@vim.org>
date Thu, 08 Sep 2022 12:00:05 +0200
parents d501a55cb205
children a85a8accd273
files src/clientserver.c src/version.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    413,
+/**/
     412,
 /**/
     411,