Skip to content

Commit

Permalink
fix ffi warning on failed to drop (apache#893)
Browse files Browse the repository at this point in the history
Can drop this after rebase on commit f0451bb, first released in 7.0.0
  • Loading branch information
jimexist authored and mcheshkov committed Aug 27, 2024
1 parent a0a572e commit 10b20cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arrow/src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 10b20cc

Please sign in to comment.