forked from aniani/vim
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)
This commit is contained in:
parent
e5a420fb33
commit
b0d12e63e8
@ -423,9 +423,7 @@ cmdsrv_main(
|
|||||||
if (argtype == ARGTYPE_EDIT_WAIT)
|
if (argtype == ARGTYPE_EDIT_WAIT)
|
||||||
{
|
{
|
||||||
int numFiles = *argc - i - 1;
|
int numFiles = *argc - i - 1;
|
||||||
int j;
|
|
||||||
char_u *done = alloc(numFiles);
|
char_u *done = alloc(numFiles);
|
||||||
char_u *p;
|
|
||||||
# ifdef FEAT_GUI_MSWIN
|
# ifdef FEAT_GUI_MSWIN
|
||||||
NOTIFYICONDATA ni;
|
NOTIFYICONDATA ni;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
@ -450,6 +448,8 @@ cmdsrv_main(
|
|||||||
vim_memset(done, 0, numFiles);
|
vim_memset(done, 0, numFiles);
|
||||||
while (memchr(done, 0, numFiles) != NULL)
|
while (memchr(done, 0, numFiles) != NULL)
|
||||||
{
|
{
|
||||||
|
char_u *p;
|
||||||
|
int j;
|
||||||
# ifdef MSWIN
|
# ifdef MSWIN
|
||||||
p = serverGetReply(srv, NULL, TRUE, TRUE, 0);
|
p = serverGetReply(srv, NULL, TRUE, TRUE, 0);
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
@ -459,6 +459,7 @@ cmdsrv_main(
|
|||||||
break;
|
break;
|
||||||
# endif
|
# endif
|
||||||
j = atoi((char *)p);
|
j = atoi((char *)p);
|
||||||
|
vim_free(p);
|
||||||
if (j >= 0 && j < numFiles)
|
if (j >= 0 && j < numFiles)
|
||||||
{
|
{
|
||||||
# ifdef FEAT_GUI_MSWIN
|
# ifdef FEAT_GUI_MSWIN
|
||||||
|
@ -703,6 +703,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
413,
|
||||||
/**/
|
/**/
|
||||||
412,
|
412,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user