]> granicus.if.org Git - php/commitdiff
Initialize CG(one_time_string) in ZTS as well
authorNikita Popov <nikic@php.net>
Mon, 5 May 2014 19:16:49 +0000 (21:16 +0200)
committerNikita Popov <nikic@php.net>
Mon, 5 May 2014 20:21:57 +0000 (22:21 +0200)
Zend/zend_string.c
ext/pdo/pdo_dbh.c

index 80571ec3908a7cffb2e2b8a4f611b8588290fc08..360ff2966e78baeabe29a51453a7939d105882a0 100644 (file)
@@ -57,9 +57,6 @@ void zend_interned_strings_init(TSRMLS_D)
        str = STR_ALLOC(sizeof("")-1, 1);
        str->val[0] = '\000';
        CG(empty_string) = zend_new_interned_string_int(str TSRMLS_CC);
-
-       /* one char strings (the actual interned strings are going to be created by ext/opcache) */
-       memset(CG(one_char_string), 0, sizeof(CG(one_char_string)));
 #else
        str = STR_ALLOC(sizeof("")-1, 1);
        str->val[0] = '\000';
@@ -67,6 +64,9 @@ void zend_interned_strings_init(TSRMLS_D)
        CG(empty_string) = str;
 #endif
 
+       /* one char strings (the actual interned strings are going to be created by ext/opcache) */
+       memset(CG(one_char_string), 0, sizeof(CG(one_char_string)));
+
        zend_new_interned_string = zend_new_interned_string_int;
        zend_interned_strings_snapshot = zend_interned_strings_snapshot_int;
        zend_interned_strings_restore = zend_interned_strings_restore_int;
index a9032d0a73ee3052a8067b85812f16abd1dbfb7a..c5b2b9fa1a041440d93c5cfe364684f485771c13 100644 (file)
@@ -1544,7 +1544,7 @@ static void pdo_dbh_free_storage(zend_object *std TSRMLS_DC)
                dbh->methods->persistent_shutdown(dbh TSRMLS_CC);
        }
        zend_object_std_dtor(std TSRMLS_CC);
-       dbh_free(dbh);
+       dbh_free(dbh TSRMLS_CC);
 }
 
 zend_object *pdo_dbh_new(zend_class_entry *ce TSRMLS_DC)