From 04df802e54962a2ac2ab53a0dee0bad1338f993d Mon Sep 17 00:00:00 2001 From: antiduh Date: Mon, 30 Jun 2014 15:05:29 +0000 Subject: [PATCH] Add ReliabilityContract for the ReleaseHandle on SafeSspiHandle so that it can fully participate in the implicit CER that is created during finalization. --- NSspi/SspiHandle.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NSspi/SspiHandle.cs b/NSspi/SspiHandle.cs index 996151b..9000774 100644 --- a/NSspi/SspiHandle.cs +++ b/NSspi/SspiHandle.cs @@ -60,6 +60,7 @@ namespace NSspi get { return IsClosed || this.rawHandle.IsZero(); } } + [ReliabilityContract( Consistency.WillNotCorruptState, Cer.Success )] protected override bool ReleaseHandle() { this.rawHandle.SetInvalid();