diff --git a/src/libraries/Common/src/System/Net/ArrayBuffer.cs b/src/libraries/Common/src/System/Net/ArrayBuffer.cs index 5dbc5a158cb781..56413164232da6 100644 --- a/src/libraries/Common/src/System/Net/ArrayBuffer.cs +++ b/src/libraries/Common/src/System/Net/ArrayBuffer.cs @@ -41,15 +41,12 @@ public void Dispose() _activeStart = 0; _availableStart = 0; - if (_usePool) - { - byte[] array = _bytes; - _bytes = null!; + byte[] array = _bytes; + _bytes = null!; - if (array != null) - { - ArrayPool.Shared.Return(array); - } + if (_usePool && array != null) + { + ArrayPool.Shared.Return(array); } }