From: Antony Dovgal Date: Mon, 29 May 2006 20:26:32 +0000 (+0000) Subject: MFH: return NULL in case of error X-Git-Tag: php-5.2.0RC1~434 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ca3826a2869a013367ba30fcc0b038b693a230b;p=php MFH: return NULL in case of error --- 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; }