Skip to content

Commit

Permalink
Add some extra drops to make it clear what we want to do
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Dec 4, 2021
1 parent 7723c5d commit 72d8880
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 72d8880

Please sign in to comment.