Skip to content

Commit 8628db1

Browse files
jhawthornXrXr
authored andcommitted
Avoid double-free in regexec after stack_double
1 parent a9e377d commit 8628db1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

regexec.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4217,9 +4217,8 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
42174217
return ONIGERR_UNEXPECTED_BYTECODE;
42184218

42194219
timeout:
4220+
STACK_SAVE;
42204221
xfree(xmalloc_base);
4221-
if (stk_base != stk_alloc || IS_NOT_NULL(msa->stack_p))
4222-
xfree(stk_base);
42234222
return ONIGERR_TIMEOUT;
42244223
}
42254224

0 commit comments

Comments
 (0)