diff options
Diffstat (limited to 'ext/opcache/zend_accelerator_util_funcs.c')
-rw-r--r-- | ext/opcache/zend_accelerator_util_funcs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c index 5d505b76ba..2cce4b4a4b 100644 --- a/ext/opcache/zend_accelerator_util_funcs.c +++ b/ext/opcache/zend_accelerator_util_funcs.c @@ -1042,7 +1042,6 @@ zend_op_array* zend_accel_load_script(zend_persistent_script *persistent_script, if (zend_hash_num_elements(&persistent_script->class_table) > 0) { zend_accel_class_hash_copy(CG(class_table), &persistent_script->class_table, NULL TSRMLS_CC); } - free_persistent_script(persistent_script, 0); /* free only hashes */ } #if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO @@ -1054,6 +1053,10 @@ zend_op_array* zend_accel_load_script(zend_persistent_script *persistent_script, } #endif + if (!from_shared_memory) { + free_persistent_script(persistent_script, 0); /* free only hashes */ + } + return op_array; } |