aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-11-24 17:23:56 +0100
committerDan Pasanen <dan.pasanen@gmail.com>2015-11-24 10:32:32 -0600
commitd3985c08268db9bc8ae64de293e27cd4c6eba6f7 (patch)
tree51abefb6d7eb01faf21a87bdc4752588faaaedf6
parentfe2f3cbb00b167a9270d6dec5f0a28813414f136 (diff)
downloadandroid_external_vim-replicant-6.0-0002.tar.gz
android_external_vim-replicant-6.0-0002.tar.bz2
android_external_vim-replicant-6.0-0002.zip
Problem: Memory leak when encountering a syntax error. Solution: Free the memory. (Dominique Pelle)
-rw-r--r--src/ex_docmd.c3
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 23514fb12..31b51e99d 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -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;
}
diff --git a/src/version.c b/src/version.c
index c89c2633f..a411fd882 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 939,
+/**/
938,
/**/
937,