]> granicus.if.org Git - php/commitdiff
Fixed interned string leaks after new STATIC_KEY flag is introduced
authorXinchen Hui <laruence@php.net>
Tue, 28 Apr 2015 03:14:21 +0000 (11:14 +0800)
committerXinchen Hui <laruence@php.net>
Tue, 28 Apr 2015 03:14:21 +0000 (11:14 +0800)
Zend/zend_string.c

index e8685a42b28fa9840546e35117764c8e4e613b46..f395d5c36c42a5719f72858c79b7e2ad655ca05c 100644 (file)
@@ -38,8 +38,7 @@ ZEND_API zend_ulong zend_hash_func(const char *str, size_t len)
 static void _str_dtor(zval *zv)
 {
        zend_string *str = Z_STR_P(zv);
-       GC_FLAGS(str) &= ~IS_STR_INTERNED;
-       GC_REFCOUNT(str) = 1;
+       pefree(str, GC_FLAGS(str) & IS_STR_PERSISTENT);
 }
 #endif