From f0451bb6ace3b479382076846e5a1dab199fd024 Mon Sep 17 00:00:00 2001 From: Jiayu Liu Date: Mon, 1 Nov 2021 11:24:39 +0800 Subject: [PATCH] fix ffi warning on failed to drop (#893) --- arrow/src/ffi.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arrow/src/ffi.rs b/arrow/src/ffi.rs index a61f291bd4ab..ef79479f3efb 100644 --- a/arrow/src/ffi.rs +++ b/arrow/src/ffi.rs @@ -132,9 +132,9 @@ unsafe extern "C" fn release_schema(schema: *mut FFI_ArrowSchema) { let schema = &mut *schema; // take ownership back to release it. - CString::from_raw(schema.format as *mut c_char); + drop(CString::from_raw(schema.format as *mut c_char)); if !schema.name.is_null() { - CString::from_raw(schema.name as *mut c_char); + drop(CString::from_raw(schema.name as *mut c_char)); } if !schema.private_data.is_null() { let private_data = Box::from_raw(schema.private_data as *mut SchemaPrivateData);