Skip to content

Commit fd39e23

Browse files
committed
Free internal_runtime_cache on shutdown for NTS
As is, the `internal_runtime_cache` is only free for ZTS builds; we also free it for NTS builds on shutdown. Co-authored-by: Bob Weinand <bobwei9@hotmail.com> Closes GH-16402.
1 parent 2c0fd88 commit fd39e23

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Zend/zend.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,10 @@ void zend_shutdown(void) /* {{{ */
12101210
CG(script_encoding_list) = NULL;
12111211
CG(script_encoding_list_size) = 0;
12121212
}
1213+
if (CG(internal_run_time_cache)) {
1214+
pefree(CG(internal_run_time_cache), 1);
1215+
CG(internal_run_time_cache) = NULL;
1216+
}
12131217
#endif
12141218
zend_map_ptr_static_last = 0;
12151219
zend_map_ptr_static_size = 0;

0 commit comments

Comments
 (0)