diff options
author | Antony Dovgal <tony2001@php.net> | 2006-05-29 20:26:32 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2006-05-29 20:26:32 +0000 |
commit | 8ca3826a2869a013367ba30fcc0b038b693a230b (patch) | |
tree | 9e095e75fdb39cf1a451f75517f2313b06b14b06 /ext/pcre/php_pcre.c | |
parent | aa40595644e79b12b349e7782b7050526660021b (diff) | |
download | php-git-8ca3826a2869a013367ba30fcc0b038b693a230b.tar.gz |
MFH: return NULL in case of error
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; } |