From 5eb1f92f31cafc48384f9096012f421b37f6d425 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 28 May 2018 16:27:12 +0300 Subject: Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. --- ext/filter/logical_filters.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ext/filter/logical_filters.c') diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index 4dec0bba14..0fe324268d 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -644,11 +644,10 @@ void php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ sregexp = zend_string_init(regexp, regexp_len, 0); re = pcre_get_compiled_regex(sregexp, &capture_count, &preg_options); + zend_string_release_ex(sregexp, 0); if (!re) { - zend_string_release(sregexp); RETURN_VALIDATION_FAILED } - zend_string_release(sregexp); match_data = php_pcre_create_match_data(capture_count, re); if (!match_data) { RETURN_VALIDATION_FAILED -- cgit v1.2.1