mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
phar: Fix more alias memory leaks
Closes GH-20154.
This commit is contained in:
3
NEWS
3
NEWS
@@ -28,7 +28,8 @@ PHP NEWS
|
||||
- Phar:
|
||||
. Fix memory leak of argument in webPhar. (nielsdos)
|
||||
. Fix memory leak when setAlias() fails. (nielsdos)
|
||||
. Fix memory leak in phar_parse_zipfile() error handling. (nielsdos)
|
||||
. Fix a bunch of memory leaks in phar_parse_zipfile() error handling.
|
||||
(nielsdos)
|
||||
. Fix file descriptor/memory leak when opening central fp fails. (nielsdos)
|
||||
|
||||
- Random:
|
||||
|
||||
@@ -314,6 +314,7 @@ foundit:
|
||||
entry.fp_type = PHAR_FP;
|
||||
entry.is_persistent = mydata->is_persistent;
|
||||
#define PHAR_ZIP_FAIL(errmsg) \
|
||||
efree(actual_alias); \
|
||||
zend_hash_destroy(&mydata->manifest); \
|
||||
HT_INVALIDATE(&mydata->manifest); \
|
||||
zend_hash_destroy(&mydata->mounted_dirs); \
|
||||
@@ -619,7 +620,6 @@ foundit:
|
||||
}
|
||||
|
||||
if (!entry.uncompressed_filesize) {
|
||||
efree(actual_alias);
|
||||
php_stream_filter_remove(filter, 1);
|
||||
pefree(entry.filename, entry.is_persistent);
|
||||
PHAR_ZIP_FAIL("unable to read in alias, truncated");
|
||||
@@ -653,7 +653,6 @@ foundit:
|
||||
}
|
||||
|
||||
if (!entry.uncompressed_filesize) {
|
||||
efree(actual_alias);
|
||||
php_stream_filter_remove(filter, 1);
|
||||
pefree(entry.filename, entry.is_persistent);
|
||||
PHAR_ZIP_FAIL("unable to read in alias, truncated");
|
||||
@@ -677,7 +676,6 @@ foundit:
|
||||
}
|
||||
|
||||
if (!entry.uncompressed_filesize) {
|
||||
efree(actual_alias);
|
||||
pefree(entry.filename, entry.is_persistent);
|
||||
PHAR_ZIP_FAIL("unable to read in alias, truncated");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user