From f5f932f4f4de113f81eb964a1d5f49f9a5168e41 Mon Sep 17 00:00:00 2001 From: Anchels Date: Mon, 20 Jan 2025 10:59:43 +0000 Subject: [PATCH] fix handle leak --- src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs b/src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs index 00dd9b68e6b1..3966bf59f961 100644 --- a/src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs +++ b/src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs @@ -61,7 +61,7 @@ public sealed class FromStdInStrategy : ICommand public void Execute(CommandContext context) { // parses stdin with the same parser that Microsoft.Extensions.Configuration.Json would use - var provider = new ReadableJsonConfigurationProvider(); + using var provider = new ReadableJsonConfigurationProvider(); using (var stream = new MemoryStream()) { using (var writer = new StreamWriter(stream, Encoding.Unicode, 1024, true))