From a943d234f5043dd52963f26d84f39baefe9659d6 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Wed, 14 Jun 2006 17:52:56 +0000 Subject: [PATCH] fix memory leak uncovered by the pcre_extra.phpt test --- ext/pcre/php_pcre.c | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.50.1