From 4e50a45db7a96274843e8da8a791478d288303e9 Mon Sep 17 00:00:00 2001 From: pjht Date: Mon, 28 Aug 2023 15:15:52 -0500 Subject: [PATCH] Fix DeviceCborInfo not freeing memory on drop --- func_avail | 12 ++++++------ src/device/info.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/func_avail b/func_avail index 940690b..767a1fb 100644 --- a/func_avail +++ b/func_avail @@ -79,7 +79,7 @@ - fido_cbor_info_certs_value_ptr - fido_cbor_info_extensions_len - fido_cbor_info_extensions_ptr -- fido_cbor_info_free +Y fido_cbor_info_free - fido_cbor_info_fwversion - fido_cbor_info_maxcredbloblen - fido_cbor_info_maxcredcntlst @@ -88,11 +88,11 @@ - fido_cbor_info_maxmsgsiz - fido_cbor_info_maxrpid_minpinlen - fido_cbor_info_minpinlen -- fido_cbor_info_new +Y fido_cbor_info_new - fido_cbor_info_new_pin_required -- fido_cbor_info_options_len -- fido_cbor_info_options_name_ptr -- fido_cbor_info_options_value_ptr +Y fido_cbor_info_options_len +Y fido_cbor_info_options_name_ptr +Y fido_cbor_info_options_value_ptr - fido_cbor_info_protocols_len - fido_cbor_info_protocols_ptr - fido_cbor_info_rk_remaining @@ -202,7 +202,7 @@ Y fido_dev_force_fido2 Y fido_dev_force_u2f Y fido_dev_free Y fido_dev_get_assert -- fido_dev_get_cbor_info +Y fido_dev_get_cbor_info Y fido_dev_get_retry_count - fido_dev_get_touch_begin - fido_dev_get_touch_status diff --git a/src/device/info.rs b/src/device/info.rs index e4ba731..0f29ca3 100644 --- a/src/device/info.rs +++ b/src/device/info.rs @@ -2,7 +2,7 @@ use std::{collections::HashMap, ffi::CStr}; use libfido2_sys::*; -c_type_wrapper!(fido_cbor_info_t, DeviceCborInfo); +c_type_wrapper!(fido_cbor_info_t, DeviceCborInfo, free = fido_cbor_info_free); impl DeviceCborInfoRef { pub fn options(&self) -> HashMap {