mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.2279: Vim9: memory leak with catch in skipped block
Problem: Vim9: memory leak with catch in skipped block. Solution: Free the pattern if not used.
This commit is contained in:
@@ -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 */
|
||||||
|
/**/
|
||||||
|
2279,
|
||||||
/**/
|
/**/
|
||||||
2278,
|
2278,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -1009,7 +1009,11 @@ generate_PUSHS(cctx_T *cctx, char_u *str)
|
|||||||
{
|
{
|
||||||
isn_T *isn;
|
isn_T *isn;
|
||||||
|
|
||||||
RETURN_OK_IF_SKIP(cctx);
|
if (cctx->ctx_skip == SKIP_YES)
|
||||||
|
{
|
||||||
|
vim_free(str);
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
if ((isn = generate_instr_type(cctx, ISN_PUSHS, &t_string)) == NULL)
|
if ((isn = generate_instr_type(cctx, ISN_PUSHS, &t_string)) == NULL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
isn->isn_arg.string = str;
|
isn->isn_arg.string = str;
|
||||||
|
Reference in New Issue
Block a user