diff options
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 9a5b7a7bca..e48a97e043 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1220,8 +1220,11 @@ static char *php_replace_in_subject(zval *regex, zval *replace, zval **subject, efree(subject_value); subject_value = result; subject_len = *result_len; + } else { + efree(subject_value); + return NULL; } - + zend_hash_move_forward(Z_ARRVAL_P(regex)); } |