From 9775942c0275dee5bdc5929664a1a0df43aa8d4f Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Fri, 7 Jun 2024 04:34:58 -0400 Subject: [PATCH] Dispose ZipArchive after usage in ExtractArchiveToDirectory (#41449) --- src/Installer/core-sdk-tasks/ExtractArchiveToDirectory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Installer/core-sdk-tasks/ExtractArchiveToDirectory.cs b/src/Installer/core-sdk-tasks/ExtractArchiveToDirectory.cs index 2585dad250e5..b0b33a042021 100644 --- a/src/Installer/core-sdk-tasks/ExtractArchiveToDirectory.cs +++ b/src/Installer/core-sdk-tasks/ExtractArchiveToDirectory.cs @@ -82,7 +82,7 @@ public override bool Execute() // Partial archive extraction if (isZipArchive) { - var zip = new ZipArchive(File.OpenRead(SourceArchive)); + using var zip = new ZipArchive(File.OpenRead(SourceArchive)); string loc = DestinationDirectory; foreach (var entry in zip.Entries) {