From 18f8a8eb88a711fc0865aa98187c1c6097ea6d5b Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Wed, 21 Feb 2018 15:40:48 +0900 Subject: [PATCH] clear REG_EXTPL value in onig_free_body() --- src/regcomp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/regcomp.c b/src/regcomp.c index 4eedfac..bd276cb 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -5982,7 +5982,10 @@ onig_free_body(regex_t* reg) if (IS_NOT_NULL(reg->int_map)) xfree(reg->int_map); if (IS_NOT_NULL(reg->int_map_backward)) xfree(reg->int_map_backward); if (IS_NOT_NULL(reg->repeat_range)) xfree(reg->repeat_range); - if (IS_NOT_NULL(REG_EXTP(reg))) free_regex_ext(REG_EXTP(reg)); + if (IS_NOT_NULL(REG_EXTP(reg))) { + free_regex_ext(REG_EXTP(reg)); + REG_EXTPL(reg) = 0; + } onig_names_free(reg); } -- 2.40.0