# HG changeset patch # User Christian Brabandt # Date 1448382605 -3600 # Node ID fadf7fc3b666c7c61ec929f20d2265a89970aec3 # Parent e558d54fcb5c9932a4833ff772cdcf8be2ba19fb commit https://github.com/vim/vim/commit/9a7d58e42ed54406437c2394e5a489ee6a9e4220 Author: Bram Moolenaar Date: Tue Nov 24 17:23:56 2015 +0100 patch 7.4.939 Problem: Memory leak when encountering a syntax error. Solution: Free the memory. (Dominique Pelle) diff --git a/src/ex_docmd.c b/src/ex_docmd.c --- 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 --- 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,