[#1262] Check pairing of deallocations vs allocations in rustBackend

- rootsPtr deallocated
This commit is contained in:
Lukas Korba 2023-09-18 08:32:01 +02:00
parent 0abe7f8cdf
commit 110007ac66
1 changed files with 4 additions and 1 deletions

View File

@ -474,7 +474,10 @@ actor ZcashRustBackend: ZcashRustBackendWelding {
let rootsPtr = UnsafeMutablePointer<FfiSubtreeRoots>.allocate(capacity: 1)
defer { ffiSubtreeRootsVec.deallocateElements() }
defer {
ffiSubtreeRootsVec.deallocateElements()
rootsPtr.deallocate()
}
try contiguousFfiRoots.withContiguousMutableStorageIfAvailable { ptr in
var roots = FfiSubtreeRoots()