Skip to content

Commit 04c4d5a

Browse files
committed
Use zend_array_destroy() instead of zend_array_release()
To make it clearer that these arrays cannot be shared and cannot be immutable.
1 parent ac54035 commit 04c4d5a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Zend/zend_execute_API.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ void shutdown_executor(void) /* {{{ */
288288
if (ZEND_MAP_PTR(op_array->static_variables_ptr)) {
289289
HashTable *ht = ZEND_MAP_PTR_GET(op_array->static_variables_ptr);
290290
if (ht) {
291-
zend_array_release(ht);
291+
zend_array_destroy(ht);
292292
ZEND_MAP_PTR_SET(op_array->static_variables_ptr, NULL);
293293
}
294294
}
@@ -311,7 +311,7 @@ void shutdown_executor(void) /* {{{ */
311311
if (ZEND_MAP_PTR(op_array->static_variables_ptr)) {
312312
HashTable *ht = ZEND_MAP_PTR_GET(op_array->static_variables_ptr);
313313
if (ht) {
314-
zend_array_release(ht);
314+
zend_array_destroy(ht);
315315
ZEND_MAP_PTR_SET(op_array->static_variables_ptr, NULL);
316316
}
317317
}

Zend/zend_opcode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ ZEND_API void destroy_op_array(zend_op_array *op_array)
518518
if (ZEND_MAP_PTR(op_array->static_variables_ptr)) {
519519
HashTable *ht = ZEND_MAP_PTR_GET(op_array->static_variables_ptr);
520520
if (ht) {
521-
zend_array_release(ht);
521+
zend_array_destroy(ht);
522522
}
523523
}
524524

0 commit comments

Comments
 (0)