From fdb3478050d8e651625669b8bc49bb810930102b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 19 Jul 2024 14:12:34 +0200 Subject: [PATCH] Fix GH-15028: Memory leak in ext/phar/stream.c --- ext/phar/stream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/phar/stream.c b/ext/phar/stream.c index ceedbdae35389..0e5c9dd1f2ae7 100644 --- a/ext/phar/stream.c +++ b/ext/phar/stream.c @@ -782,6 +782,7 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, const char *url_from } if (PHAR_G(readonly) && (!pto || !pto->is_data)) { php_url_free(resource_from); + php_url_free(resource_to); php_error_docref(NULL, E_WARNING, "phar error: Write operations disabled by the php.ini setting phar.readonly"); return 0; }