diff options
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 91d70975fb..76b9822621 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1115,6 +1115,10 @@ PHPAPI char *php_pcre_replace(char *regex, int regex_len, } } else { pcre_handle_exec_error(count TSRMLS_CC); + if (result) { + efree(result); + result = NULL; + } break; } |