diff --git a/src/ImageSharp/Formats/ImageDecoderUtilities.cs b/src/ImageSharp/Formats/ImageDecoderUtilities.cs index 933a571cc8..6bb9116cda 100644 --- a/src/ImageSharp/Formats/ImageDecoderUtilities.cs +++ b/src/ImageSharp/Formats/ImageDecoderUtilities.cs @@ -22,7 +22,7 @@ namespace SixLabors.ImageSharp.Formats return decoder.Identify(stream); } - await using MemoryStream ms = decoder.Configuration.MemoryAllocator.AllocateFixedCapacityMemoryStream(stream.Length); + using MemoryStream ms = decoder.Configuration.MemoryAllocator.AllocateFixedCapacityMemoryStream(stream.Length); await stream.CopyToAsync(ms).ConfigureAwait(false); ms.Position = 0; return decoder.Identify(ms); @@ -46,7 +46,7 @@ namespace SixLabors.ImageSharp.Formats return decoder.Decode(stream); } - await using MemoryStream ms = decoder.Configuration.MemoryAllocator.AllocateFixedCapacityMemoryStream(stream.Length); + using MemoryStream ms = decoder.Configuration.MemoryAllocator.AllocateFixedCapacityMemoryStream(stream.Length); await stream.CopyToAsync(ms).ConfigureAwait(false); ms.Position = 0; return decoder.Decode(ms);