Skip to content

Commit 5996227

Browse files
committed
Fix GH-15028: Memory leak in ext/phar/stream.c
Closes GH-15029.
1 parent 8c19efd commit 5996227

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ PHP NEWS
1414
- Soap:
1515
. Fixed bug #55639 (Digest autentication dont work). (nielsdos)
1616

17+
- Streams:
18+
. Fixed bug GH-15028 (Memory leak in ext/phar/stream.c). (nielsdos)
19+
1720
01 Aug 2024, PHP 8.2.22
1821

1922
- Core:

ext/phar/stream.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, const char *url_from
782782
}
783783
if (PHAR_G(readonly) && (!pto || !pto->is_data)) {
784784
php_url_free(resource_from);
785+
php_url_free(resource_to);
785786
php_error_docref(NULL, E_WARNING, "phar error: Write operations disabled by the php.ini setting phar.readonly");
786787
return 0;
787788
}

0 commit comments

Comments
 (0)