Skip to content

Commit

Permalink
fix: don't segfault on errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Mause committed Apr 14, 2024
1 parent bad206e commit ed50fb9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/vtab/arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ impl VTab for ArrowVTab {
output.set_len(0);
} else {
let rb = Box::from_raw((*bind_info).rb);
(*bind_info).rb = null_mut(); // erase ref in case of failure in record_batch_to_duckdb_data_chunk
record_batch_to_duckdb_data_chunk(&rb, output)?;
(*bind_info).rb = Box::into_raw(rb);
(*init_info).done = true;
Expand Down

0 comments on commit ed50fb9

Please sign in to comment.