com php-src: fix leaking the empty_string in TS builds : Zend/zend.c Zend/zend_string.c

From: Date: Mon, 06 Oct 2014 11:38:13 +0000
Subject: com php-src: fix leaking the empty_string in TS builds : Zend/zend.c Zend/zend_string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82161@lists.php.net to get a copy of this message
Commit: 72b34e1372ff7a0bbca6bdca681b8aaa37b4a586 Author: Anatol Belski <ab@php.net> Mon, 6 Oct 2014 13:38:13 +0200 Parents: 8d4ee9fbaabd00878190b8ae227dbbefc62b08fc Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=72b34e1372ff7a0bbca6bdca681b8aaa37b4a586 Log: fix leaking the empty_string in TS builds Changed paths: M Zend/zend.c M Zend/zend_string.c Diff: diff --git a/Zend/zend.c b/Zend/zend.c index 8a6e09e..2762b09 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -477,7 +477,10 @@ static void compiler_globals_dtor(zend_compiler_globals *compiler_globals TSRMLS compiler_globals->last_static_member = 0; #ifdef ZTS - zend_string_release(compiler_globals->empty_string); + if (NULL != compiler_globals->empty_string) { + free(compiler_globals->empty_string); + compiler_globals->empty_string = NULL; + } #endif } /* }}} */ diff --git a/Zend/zend_string.c b/Zend/zend_string.c index a4455e8..a2fe091 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -80,7 +80,10 @@ void zend_interned_strings_dtor(TSRMLS_D) #ifndef ZTS zend_hash_destroy(&CG(interned_strings)); #else - zend_string_release(CG(empty_string)); + if (NULL != CG(empty_string)) { + free(CG(empty_string)); + CG(empty_string) = NULL; + } #endif }

« previous php.cvs (#82161) next »