Skip to content

Commit 9a7d58e

Browse files
committed
patch 7.4.939
Problem: Memory leak when encountering a syntax error. Solution: Free the memory. (Dominique Pelle)
1 parent 88e484b commit 9a7d58e

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/ex_docmd.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12117,6 +12117,7 @@ ex_match(eap)
1211712117
if (*p == NUL)
1211812118
{
1211912119
/* There must be two arguments. */
12120+
vim_free(g);
1212012121
EMSG2(_(e_invarg2), eap->arg);
1212112122
return;
1212212123
}
@@ -12125,11 +12126,13 @@ ex_match(eap)
1212512126
{
1212612127
if (*end != NUL && !ends_excmd(*skipwhite(end + 1)))
1212712128
{
12129+
vim_free(g);
1212812130
eap->errmsg = e_trailing;
1212912131
return;
1213012132
}
1213112133
if (*end != *p)
1213212134
{
12135+
vim_free(g);
1213312136
EMSG2(_(e_invarg2), p);
1213412137
return;
1213512138
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
939,
744746
/**/
745747
938,
746748
/**/

0 commit comments

Comments
 (0)