0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 7.4.1867

Problem:    Memory leak in test_matchstrpos.
Solution:   Free the string before overwriting. (Yegappan Lakshmanan)
This commit is contained in:
Bram Moolenaar 2016-06-01 22:34:48 +02:00
parent a96732150c
commit 3c809343c7
2 changed files with 3 additions and 0 deletions

View File

@ -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 =

View File

@ -753,6 +753,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1867,
/**/
1866,
/**/