[niepce] npc-fwk: drop explicitely the CString
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] npc-fwk: drop explicitely the CString
- Date: Thu, 17 Mar 2022 02:50:34 +0000 (UTC)
commit b02d8df49a4003b7e41299f9577e7d05a8d6a030
Author: Hubert Figuière <hub figuiere net>
Date: Tue Mar 15 00:43:30 2022 -0400
npc-fwk: drop explicitely the CString
crates/npc-fwk/src/capi.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/crates/npc-fwk/src/capi.rs b/crates/npc-fwk/src/capi.rs
index 207f684..aeda373 100644
--- a/crates/npc-fwk/src/capi.rs
+++ b/crates/npc-fwk/src/capi.rs
@@ -26,5 +26,5 @@ use std::ffi::CString;
/// Dereference the pointer
#[no_mangle]
pub unsafe extern "C" fn rust_cstring_delete(string: *mut c_char) {
- CString::from_raw(string);
+ drop(CString::from_raw(string));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]