Skip to content

Commit ba8033f

Browse files
committed
Fixed use-after-free
1 parent f365d0e commit ba8033f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Zend/zend_execute_API.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ void shutdown_executor(void) /* {{{ */
359359
if (ht) {
360360
ZEND_ASSERT(GC_REFCOUNT(ht) == 1);
361361
zend_array_destroy(ht);
362+
ZEND_MAP_PTR_SET(op_array->static_variables_ptr, NULL);
362363
}
363364
}
364365
} ZEND_HASH_FOREACH_END();
@@ -390,6 +391,7 @@ void shutdown_executor(void) /* {{{ */
390391
if (ht) {
391392
ZEND_ASSERT(GC_REFCOUNT(ht) == 1);
392393
zend_array_destroy(ht);
394+
ZEND_MAP_PTR_SET(op_array->static_variables_ptr, NULL);
393395
}
394396
}
395397
}

0 commit comments

Comments
 (0)