]> granicus.if.org Git - php/commitdiff
fix leaking the empty_string in TS builds
authorAnatol Belski <ab@php.net>
Mon, 6 Oct 2014 11:38:13 +0000 (13:38 +0200)
committerAnatol Belski <ab@php.net>
Mon, 6 Oct 2014 11:38:13 +0000 (13:38 +0200)
Zend/zend.c
Zend/zend_string.c

index 8a6e09ea04f689d1e164793147be0efb2a4d7ee0..2762b0922ef86ff63c53769a69bd96a6afa010e2 100644 (file)
@@ -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
 }
 /* }}} */
index a4455e8da96c8f9ff8a1a94ded5d7834710e657a..a2fe091695fae4ec789853def7c62ff01c8d9609 100644 (file)
@@ -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
 }