Skip to content

Commit 7b010e8

Browse files
[VMR] Codeflow 67889d9-5ba48ca
[[ commit created by automation ]]
1 parent 5ba48ca commit 7b010e8

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -419,11 +419,8 @@ public void Dispose()
419419
{
420420
_pipeWriter.Abort();
421421

422-
if (_fakeMemoryOwner != null)
423-
{
424-
_fakeMemoryOwner.Dispose();
425-
_fakeMemoryOwner = null;
426-
}
422+
_fakeMemoryOwner?.Dispose();
423+
_fakeMemoryOwner = null;
427424

428425
if (_fakeMemory != null)
429426
{

src/Servers/Kestrel/Core/src/Internal/Http2/Http2OutputProducer.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,8 @@ public void Complete()
232232
_pipeWriter.Complete();
233233
}
234234

235-
if (_fakeMemoryOwner != null)
236-
{
237-
_fakeMemoryOwner.Dispose();
238-
_fakeMemoryOwner = null;
239-
}
235+
_fakeMemoryOwner?.Dispose();
236+
_fakeMemoryOwner = null;
240237

241238
if (_fakeMemory != null)
242239
{

src/Servers/Kestrel/Core/src/Internal/Http3/Http3OutputProducer.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,9 @@ public void Complete()
7878

7979
_pipeWriter.Complete();
8080

81-
if (_fakeMemoryOwner != null)
82-
{
83-
_fakeMemoryOwner.Dispose();
84-
_fakeMemoryOwner = null;
85-
}
81+
_fakeMemoryOwner?.Dispose();
82+
_fakeMemoryOwner = null;
83+
8684
if (_fakeMemory != null)
8785
{
8886
ArrayPool<byte>.Shared.Return(_fakeMemory);

0 commit comments

Comments
 (0)