Skip to content

Commit d05f88e

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: phar: Fix file descriptor leak in phar_zip_flush() on failure.
2 parents d78faac + 40efac0 commit d05f88e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/phar/zip.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,6 +1278,7 @@ void phar_zip_flush(phar_archive_data *phar, zend_string *user_stub, bool is_def
12781278
return;
12791279
}
12801280
if (phar->alias_len != php_stream_write(entry.fp, phar->alias, phar->alias_len)) {
1281+
php_stream_close(entry.fp);
12811282
if (error) {
12821283
spprintf(error, 0, "unable to set alias in zip-based phar \"%s\"", phar->fname);
12831284
}

0 commit comments

Comments
 (0)