Mercurial > vim
changeset 7262:fadf7fc3b666 v7.4.939
commit https://github.com/vim/vim/commit/9a7d58e42ed54406437c2394e5a489ee6a9e4220
Author: Bram Moolenaar <Bram@vim.org>
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 24 Nov 2015 17:30:05 +0100 |
parents | e558d54fcb5c |
children | 75a888b9d8a0 |
files | src/ex_docmd.c src/version.c |
diffstat | 2 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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; }