summaryrefslogtreecommitdiff
path: root/ext/filter/logical_filters.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-05-28 16:27:12 +0300
committerDmitry Stogov <dmitry@zend.com>2018-05-28 16:27:12 +0300
commit5eb1f92f31cafc48384f9096012f421b37f6d425 (patch)
tree4ed67b92229407e7b5cbab37b96428fe80eb3f94 /ext/filter/logical_filters.c
parent925f05dd1a35eafa71eb29abb69cdfc31a23a75d (diff)
downloadphp-git-5eb1f92f31cafc48384f9096012f421b37f6d425.tar.gz
Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.
Diffstat (limited to 'ext/filter/logical_filters.c')
-rw-r--r--ext/filter/logical_filters.c3
1 files changed, 1 insertions, 2 deletions
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