summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi/src/parse/stream.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-03-21 14:17:48 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-03-21 14:59:26 +0100
commite211159b7b8eb37b45ce03c34be1fdb026101cf0 (patch)
tree7775da0e9012eadc0a695787f8db30c036590cc0 /openpgp-ffi/src/parse/stream.rs
parente3cb52fede1872f93371677224201228a62ae6ce (diff)
openpgp-ffi: Fix memory leak.
Diffstat (limited to 'openpgp-ffi/src/parse/stream.rs')
-rw-r--r--openpgp-ffi/src/parse/stream.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/openpgp-ffi/src/parse/stream.rs b/openpgp-ffi/src/parse/stream.rs
index 79682f38..c3e7283b 100644
--- a/openpgp-ffi/src/parse/stream.rs
+++ b/openpgp-ffi/src/parse/stream.rs
@@ -259,6 +259,9 @@ impl VerificationHelper for VHelper {
&mut tpk_refs_raw, &mut tpk_refs_raw_len as *mut usize,
&mut free);
+ // Free the KeyID wrappers.
+ ids.into_iter().for_each(|id| super::super::keyid::pgp_keyid_free(id));
+
if result != Status::Success {
// XXX: We need to convert the status to an error. A
// status contains less information, but we should do the