mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed usage after free
This commit is contained in:
parent
ab4c4c3970
commit
aa3ddda8e5
1 changed files with 4 additions and 1 deletions
|
@ -979,7 +979,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
|
||||
|
@ -991,6 +990,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue