1
0
forked from aniani/vim

patch 7.4.939

Problem:    Memory leak when encountering a syntax error.
Solution:   Free the memory. (Dominique Pelle)
This commit is contained in:
Bram Moolenaar
2015-11-24 17:23:56 +01:00
parent 88e484bf1b
commit 9a7d58e42e
2 changed files with 5 additions and 0 deletions

View File

@@ -12117,6 +12117,7 @@ ex_match(eap)
if (*p == NUL)
{
/* There must be two arguments. */
vim_free(g);
EMSG2(_(e_invarg2), eap->arg);
return;
}
@@ -12125,11 +12126,13 @@ ex_match(eap)
{
if (*end != NUL && !ends_excmd(*skipwhite(end + 1)))
{
vim_free(g);
eap->errmsg = e_trailing;
return;
}
if (*end != *p)
{
vim_free(g);
EMSG2(_(e_invarg2), p);
return;
}

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
939,
/**/
938,
/**/