safer backend release (#701)
This commit is contained in:
parent
64e6a602fd
commit
6fab252bf1
|
@ -88,6 +88,10 @@ proc prove*[H](
|
|||
var
|
||||
backend: ptr CircomCompatCtx
|
||||
|
||||
defer:
|
||||
if backend != nil:
|
||||
backend.addr.releaseCircomCompat()
|
||||
|
||||
if initCircomCompat(
|
||||
self.backendCfg,
|
||||
addr backend) != ERR_OK or backend == nil:
|
||||
|
@ -169,9 +173,6 @@ proc prove*[H](
|
|||
if proofPtr != nil:
|
||||
proofPtr.addr.releaseProof()
|
||||
|
||||
if backend != nil:
|
||||
backend.addr.releaseCircomCompat()
|
||||
|
||||
success proof
|
||||
|
||||
proc verify*(
|
||||
|
|
Loading…
Reference in New Issue