Skip to content

Commit

Permalink
Dispose stream in caller method
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieKimani1 committed Dec 20, 2024
1 parent 28e1ecd commit 56742b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public static async Task<ReadResult> LoadAsync(Stream input, string format = nul
if (!settings.LeaveStreamOpen)
{
input.Dispose();
preparedStream.Dispose();
}

return result;
Expand Down

0 comments on commit 56742b9

Please sign in to comment.