summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-06-24 09:30:59 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-06-25 10:25:44 +0200
commit46bad1d67975527a5b01e9140a799dbf64de8863 (patch)
treebbfbf39067c2efa4451a9cf74e13b0d80d73b12d /ext/mbstring/php_mbregex.c
parent0f29fb5cd81d9df4829bc63f704019df910b3075 (diff)
downloadphp-git-46bad1d67975527a5b01e9140a799dbf64de8863.tar.gz
Fix region leak in mb_ereg_replace
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r--ext/mbstring/php_mbregex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 9fac8233ba..d315712781 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -1157,7 +1157,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
if (zend_eval_stringl(ZSTR_VAL(eval_str), ZSTR_LEN(eval_str), &v, description) == FAILURE) {
efree(description);
zend_throw_error(NULL, "Failed evaluating code: %s%s", PHP_EOL, ZSTR_VAL(eval_str));
- onig_region_free(regs, 0);
+ onig_region_free(regs, 1);
smart_str_free(&out_buf);
smart_str_free(&eval_buf);
RETURN_FALSE;