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:
@@ -12117,6 +12117,7 @@ ex_match(eap)
|
|||||||
if (*p == NUL)
|
if (*p == NUL)
|
||||||
{
|
{
|
||||||
/* There must be two arguments. */
|
/* There must be two arguments. */
|
||||||
|
vim_free(g);
|
||||||
EMSG2(_(e_invarg2), eap->arg);
|
EMSG2(_(e_invarg2), eap->arg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -12125,11 +12126,13 @@ ex_match(eap)
|
|||||||
{
|
{
|
||||||
if (*end != NUL && !ends_excmd(*skipwhite(end + 1)))
|
if (*end != NUL && !ends_excmd(*skipwhite(end + 1)))
|
||||||
{
|
{
|
||||||
|
vim_free(g);
|
||||||
eap->errmsg = e_trailing;
|
eap->errmsg = e_trailing;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (*end != *p)
|
if (*end != *p)
|
||||||
{
|
{
|
||||||
|
vim_free(g);
|
||||||
EMSG2(_(e_invarg2), p);
|
EMSG2(_(e_invarg2), p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -741,6 +741,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 */
|
||||||
|
/**/
|
||||||
|
939,
|
||||||
/**/
|
/**/
|
||||||
938,
|
938,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user