Skip to content

Commit

Permalink
fix: set copy context to null after deleting it
Browse files Browse the repository at this point in the history
  • Loading branch information
aykut-bozkurt committed Jan 21, 2025
1 parent 47a0209 commit 2ca5739
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/parquet_copy_hook/copy_to_dest_receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ impl CopyToParquetDestReceiver {
fn cleanup(&mut self) {
if !self.per_copy_context.is_null() {
unsafe { MemoryContextDelete(self.per_copy_context) };

self.per_copy_context = std::ptr::null_mut();
}

if !self.parquet_writer_context.is_null() {
Expand Down

0 comments on commit 2ca5739

Please sign in to comment.