diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/CriticalHandle.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/CriticalHandle.cs index 83160dddea4..fc6a27d18ca 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/CriticalHandle.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/CriticalHandle.cs @@ -149,8 +149,7 @@ private void Cleanup() // occur implicitly as part of unmarshaling another P/Invoke). int lastError = Marshal.GetLastWin32Error(); - if (!ReleaseHandle()) - ReleaseHandleFailed(); + ReleaseHandle(); Marshal.SetLastWin32Error(lastError); GC.SuppressFinalize(this);