]> granicus.if.org Git - php/commitdiff
In case the string can't be interned it must not be released
authorDmitry Stogov <dmitry@zend.com>
Tue, 1 Apr 2014 10:35:34 +0000 (14:35 +0400)
committerDmitry Stogov <dmitry@zend.com>
Tue, 1 Apr 2014 10:35:34 +0000 (14:35 +0400)
Zend/zend_compile.c

index 8dcaf29cdc1515cd6ba726b55c9a946c7e1dd0c7..1d461ddaa715459c65d6c2ae69d8efcc24bd402b 100644 (file)
@@ -6239,7 +6239,9 @@ void zend_do_indirect_references(znode *result, const znode *num_references, zno
        if (CG(active_op_array)->scope && CG(active_op_array)->this_var == -1) {
                zend_string *key = STR_INIT("this", sizeof("this")-1, 0);
                CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), key TSRMLS_CC);
-               STR_RELEASE(key);
+               if (CG(active_op_array)->vars[EX_VAR_TO_NUM(CG(active_op_array)->this_var)] != key) {
+                       STR_RELEASE(key);
+               }
        }
 }
 /* }}} */