Skip to content

Commit f1436c4

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fix minor memory leak of CG(script_encoding_list)
2 parents d05e882 + c1a80e0 commit f1436c4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Zend/zend.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,11 @@ void zend_shutdown(void) /* {{{ */
11051105
ZEND_MAP_PTR_SET_REAL_BASE(CG(map_ptr_base), NULL);
11061106
CG(map_ptr_size) = 0;
11071107
}
1108+
if (CG(script_encoding_list)) {
1109+
free(CG(script_encoding_list));
1110+
CG(script_encoding_list) = NULL;
1111+
CG(script_encoding_list_size) = 0;
1112+
}
11081113
#endif
11091114
zend_destroy_rsrc_list_dtors();
11101115
}

0 commit comments

Comments
 (0)