summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-10-12 14:17:06 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-10-13 11:38:11 +0200
commita7c19682e6980baad8f09357ca4acc5ac9c41ee5 (patch)
tree2b217f7b58744466f8d5fe54577741a445aad6d2
parent5be2a025ed75cc4307747a3834581dda8090d408 (diff)
openpgp-ffi: Fix leak.
-rw-r--r--openpgp-ffi/src/cert.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp-ffi/src/cert.rs b/openpgp-ffi/src/cert.rs
index 450d2925..f47e9021 100644
--- a/openpgp-ffi/src/cert.rs
+++ b/openpgp-ffi/src/cert.rs
@@ -376,7 +376,7 @@ pub extern "C" fn pgp_cert_user_id_iter_policy<'a>(
-> *mut ValidUserIDIterWrapper<'static>
{
let policy = policy.ref_raw();
- let iter_wrapper = ffi_param_ref_mut!(iter_wrapper);
+ let mut iter_wrapper = ffi_param_move!(iter_wrapper);
if iter_wrapper.next_called {
panic!("Can't change UserIDIter filter after iterating.");
}
@@ -547,7 +547,7 @@ pub extern "C" fn pgp_cert_key_iter_policy<'a>(
-> *mut ValidKeyAmalgamationIterWrapper<'static>
{
let policy = policy.ref_raw();
- let iter_wrapper = ffi_param_ref_mut!(iter_wrapper);
+ let mut iter_wrapper = ffi_param_move!(iter_wrapper);
if iter_wrapper.next_called {
panic!("Can't change KeyAmalgamationIter filter after iterating.");
}