diff options
author | Nuno Lopes <nlopess@php.net> | 2006-06-14 17:52:56 +0000 |
---|---|---|
committer | Nuno Lopes <nlopess@php.net> | 2006-06-14 17:52:56 +0000 |
commit | a943d234f5043dd52963f26d84f39baefe9659d6 (patch) | |
tree | a3c94347b416268633a9962c8d1bdafb5f057c2d /ext/pcre/php_pcre.c | |
parent | a7bc286638ff4ed9ac8ced1969dc945caf815024 (diff) | |
download | php-git-a943d234f5043dd52963f26d84f39baefe9659d6.tar.gz |
fix memory leak uncovered by the pcre_extra.phpt test
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; } |