File tree Expand file tree Collapse file tree 5 files changed +967
-7
lines changed
bindings/netstandard/ElectionGuard
ElectionGuard.Encryption.Tests Expand file tree Collapse file tree 5 files changed +967
-7
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 77 <!-- Project -->
88 <RootNamespace >ElectionGuard</RootNamespace >
99 <AssemblyName >ElectionGuard.Encryption</AssemblyName >
10- <Version >0.1.16 </Version >
11- <AssemblyVersion >0.1.16 .0</AssemblyVersion >
12- <AssemblyFileVersion >0.1.16 .0</AssemblyFileVersion >
10+ <Version >0.1.17 </Version >
11+ <AssemblyVersion >0.1.17 .0</AssemblyVersion >
12+ <AssemblyFileVersion >0.1.17 .0</AssemblyFileVersion >
1313 </PropertyGroup >
1414
1515 <PropertyGroup >
1919 <Title >ElectionGuard Encryption</Title >
2020 <Description >Open source implementation of ElectionGuard's ballot encryption.</Description >
2121 <Authors >Microsoft</Authors >
22- <PackageVersion >0.1.16 </PackageVersion >
22+ <PackageVersion >0.1.17 </PackageVersion >
2323 <PackageLicenseExpression >MIT</PackageLicenseExpression >
2424 <PackageProjectUrl >https://github.com/microsoft/electionguard-cpp</PackageProjectUrl >
2525 <RepositoryUrl >https://github.com/microsoft/electionguard-cpp</RepositoryUrl >
Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ internal unsafe ElectionguardSafeHandle(
5050
5151 public IntPtr Ptr => handle ;
5252
53+ protected bool IsFreed = false ;
54+
5355 protected abstract bool Free ( ) ;
5456
5557 protected override bool ReleaseHandle ( )
@@ -59,6 +61,7 @@ protected override bool ReleaseHandle()
5961 var freed = Free ( ) ;
6062 if ( freed )
6163 {
64+ IsFreed = true ;
6265 Close ( ) ;
6366 }
6467 return freed ;
Original file line number Diff line number Diff line change @@ -2793,7 +2793,7 @@ internal class PlaintextBallotHandle
27932793 [ ReliabilityContract ( Consistency . WillNotCorruptState , Cer . MayFail ) ]
27942794 protected override bool Free ( )
27952795 {
2796- if ( IsClosed ) return true ;
2796+ if ( IsFreed ) return true ;
27972797
27982798 var status = PlaintextBallot . Free ( TypedPtr ) ;
27992799 if ( status != Status . ELECTIONGUARD_STATUS_SUCCESS )
@@ -2924,7 +2924,7 @@ internal class CiphertextBallotHandle
29242924 [ ReliabilityContract ( Consistency . WillNotCorruptState , Cer . MayFail ) ]
29252925 protected override bool Free ( )
29262926 {
2927- if ( IsClosed ) return true ;
2927+ if ( IsFreed ) return true ;
29282928
29292929 var status = CiphertextBallot . Free ( TypedPtr ) ;
29302930 if ( status != Status . ELECTIONGUARD_STATUS_SUCCESS )
@@ -3118,7 +3118,7 @@ internal class SubmittedBallotHandle
31183118 [ ReliabilityContract ( Consistency . WillNotCorruptState , Cer . MayFail ) ]
31193119 protected override bool Free ( )
31203120 {
3121- if ( IsClosed ) return true ;
3121+ if ( IsFreed ) return true ;
31223122
31233123 var status = SubmittedBallot . Free ( TypedPtr ) ;
31243124 if ( status != Status . ELECTIONGUARD_STATUS_SUCCESS )
You can’t perform that action at this time.
0 commit comments