diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-06-01 22:34:48 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-06-01 22:34:48 +0200 |
commit | 3c809343c72d9964475f421fd03bb892bc584a51 (patch) | |
tree | 51e3d8454c35b27494dad3da409d0d0045b87db0 /src/eval.c | |
parent | a96732150cda2f242133228579b05437a39b8daa (diff) |
patch 7.4.1867v7.4.1867
Problem: Memory leak in test_matchstrpos.
Solution: Free the string before overwriting. (Yegappan Lakshmanan)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index a49d54bd05..7b8a0ae958 100644 --- a/src/eval.c +++ b/src/eval.c @@ -15773,6 +15773,7 @@ find_some_match(typval_T *argvars, typval_T *rettv, int type) listitem_T *li3 = li2->li_next; listitem_T *li4 = li3->li_next; + vim_free(li1->li_tv.vval.v_string); li1->li_tv.vval.v_string = vim_strnsave(regmatch.startp[0], (int)(regmatch.endp[0] - regmatch.startp[0])); li3->li_tv.vval.v_number = |