This is an automated email from the ASF dual-hosted git repository.

jiayuliu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new f0451bb  fix ffi warning on failed to drop (#893)
f0451bb is described below

commit f0451bb6ace3b479382076846e5a1dab199fd024
Author: Jiayu Liu <[email protected]>
AuthorDate: Mon Nov 1 11:24:39 2021 +0800

    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 a61f291..ef79479 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);

Reply via email to