WordPress/wp-admin
costdev 872ad9e0b8 Filesystem API: Free the archive in _unzip_file_ziparchive().
There are several early returns in `_unzip_file_ziparchive()` which don't close the archive prior to returning.

As this function is used in installation and upgrade processes which are memory-intensive, this calls `ZipArchive::close()` to free the archive prior to each early return. This excludes the first return which is a result of a failure to open the archive, which is [https://github.com/nih-at/libzip/blob/main/lib/zip_open.c#L62-L73 freed internally] when the failure occurs.

References:
- PHP.net: [https://www.php.net/manual/en/ziparchive.open.php ZipArchive::open()] and [https://www.php.net/manual/en/ziparchive.close.php ZipArchive::close()]
- libzip: [https://libzip.org/documentation/zip_open.html zip_open()] and [https://libzip.org/documentation/zip_close.html zip_close()]

Follow-up to: [13005], [13006], [13015], [13221], [14346] [25779].

Props azaozz, afragen, joemcgill, costdev.
Fixes #59467
Built from https://develop.svn.wordpress.org/trunk@56735


git-svn-id: http://core.svn.wordpress.org/trunk@56247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-09-27 16:31:19 +00:00
..
css
images
includes Filesystem API: Free the archive in _unzip_file_ziparchive(). 2023-09-27 16:31:19 +00:00
js
maint
network
user
about.php
admin-ajax.php
admin-footer.php
admin-functions.php
admin-header.php
admin-post.php Administration: Require a valid action parameter to be set for admin-ajax.php requests. 2022-03-02 15:00:11 +00:00
admin.php
async-upload.php
authorize-application.php
comment.php
contribute.php
credits.php
custom-background.php
custom-header.php
customize.php
edit-comments.php Administration: Use wp_admin_notice() more in wp-admin/. 2023-09-17 15:33:17 +00:00
edit-form-advanced.php
edit-form-blocks.php
edit-form-comment.php
edit-link-form.php
edit-tag-form.php Administration: Use wp_admin_notice() in /wp-admin/. 2023-09-14 00:54:19 +00:00
edit-tags.php
edit.php
erase-personal-data.php Text Changes: Remove empty space in Erase Personal Data help tab. 2023-09-27 15:44:24 +00:00
export-personal-data.php
export.php
freedoms.php
import.php
index.php
install-helper.php
install.php
link-add.php
link-manager.php
link-parse-opml.php
link.php
load-scripts.php Docs: Update a comment in wp-admin/load-styles.php per the documentation standards. 2021-12-12 14:52:02 +00:00
load-styles.php
media-new.php
media-upload.php
media.php
menu-header.php
menu.php
moderation.php
ms-admin.php
ms-delete-site.php
ms-edit.php
ms-options.php
ms-sites.php
ms-themes.php
ms-upgrade-network.php
ms-users.php
my-sites.php
nav-menus.php
network.php
options-discussion.php
options-general.php
options-head.php
options-media.php
options-permalink.php
options-privacy.php
options-reading.php
options-writing.php
options.php
plugin-editor.php Administration: Use wp_admin_notice() more in wp-admin/. 2023-09-17 15:33:17 +00:00
plugin-install.php
plugins.php
post-new.php
post.php
press-this.php
privacy-policy-guide.php
privacy.php
profile.php
revision.php
setup-config.php
site-editor.php
site-health-info.php
site-health.php
term.php General: Replace all esc_url_raw() calls in core with sanitize_url(). 2022-06-01 18:14:10 +00:00
theme-editor.php
theme-install.php
themes.php
tools.php
update-core.php Administration: Switch order of label/checkbox in WP_List_Table. 2023-09-22 19:58:16 +00:00
update.php
upgrade-functions.php
upgrade.php
upload.php
user-edit.php
user-new.php
users.php
widgets-form-blocks.php
widgets-form.php
widgets.php