diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-11-24 17:23:56 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-11-24 17:23:56 +0100 |
commit | 9a7d58e42ed54406437c2394e5a489ee6a9e4220 (patch) | |
tree | 2caa0854cbb5c6e0c023e749bf9c4e6d367f9f30 /src | |
parent | 88e484bf1b0afb5f2dec44f19335729578ace66a (diff) |
patch 7.4.939v7.4.939
Problem: Memory leak when encountering a syntax error.
Solution: Free the memory. (Dominique Pelle)
Diffstat (limited to 'src')
-rw-r--r-- | src/ex_docmd.c | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 23514fb124..31b51e99d6 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 c89c2633f3..a411fd8828 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, |