From: Nuno Lopes Date: Wed, 14 Jun 2006 17:52:56 +0000 (+0000) Subject: fix memory leak uncovered by the pcre_extra.phpt test X-Git-Tag: php-5.2.0RC1~311 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a943d234f5043dd52963f26d84f39baefe9659d6;p=php fix memory leak uncovered by the pcre_extra.phpt test --- diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index f237ab700b..58225eb09e 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -343,6 +343,9 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_le if (re == NULL) { php_error_docref(NULL TSRMLS_CC,E_WARNING, "Compilation failed: %s at offset %d", error, erroffset); efree(pattern); + if (tables) { + pefree((void*)tables, 1); + } return NULL; }