timsaucer commented on code in PR #18672:
URL: https://github.com/apache/datafusion/pull/18672#discussion_r2553157892


##########
datafusion/ffi/src/udaf/accumulator.rs:
##########
@@ -173,9 +177,11 @@ unsafe extern "C" fn retract_batch_fn_wrapper(
 }
 
 unsafe extern "C" fn release_fn_wrapper(accumulator: &mut FFI_Accumulator) {
-    let private_data =
-        Box::from_raw(accumulator.private_data as *mut AccumulatorPrivateData);
-    drop(private_data);
+    if !accumulator.private_data.is_null() {

Review Comment:
   Oh, and the reason it's needed here is because the underlying storage is a 
`Box<>`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to