mirror of
https://github.com/php/php-src.git
synced 2025-01-22 03:34:19 +08:00
fix memory leak uncovered by the pcre_extra.phpt test
This commit is contained in:
parent
a7bc286638
commit
a943d234f5
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user