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

patch 8.2.2844: Vim9: memory leak when using searchpair()

Problem:    Vim9: memory leak when using searchpair().
Solution:   Free the v_instr field.
This commit is contained in:
Bram Moolenaar 2021-05-07 20:43:54 +02:00
parent f06ab6ba38
commit 24f720998f
2 changed files with 6 additions and 1 deletions

View File

@ -151,10 +151,13 @@ clear_tv(typval_T *varp)
channel_unref(varp->vval.v_channel); channel_unref(varp->vval.v_channel);
varp->vval.v_channel = NULL; varp->vval.v_channel = NULL;
#endif #endif
break;
case VAR_INSTR:
VIM_CLEAR(varp->vval.v_instr);
break;
case VAR_UNKNOWN: case VAR_UNKNOWN:
case VAR_ANY: case VAR_ANY:
case VAR_VOID: case VAR_VOID:
case VAR_INSTR:
break; break;
} }
varp->v_lock = 0; varp->v_lock = 0;

View File

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