File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,10 +109,13 @@ unsafe extern "C" fn entries_fn_wrapper(
109109}
110110
111111unsafe extern "C" fn release_fn_wrapper ( options : & mut FFI_ExtensionOptions ) {
112- let private_data = unsafe {
113- Box :: from_raw ( options. private_data as * mut ExtensionOptionsPrivateData )
114- } ;
115- drop ( private_data) ;
112+ unsafe {
113+ debug_assert ! ( !options. private_data. is_null( ) ) ;
114+ let private_data =
115+ Box :: from_raw ( options. private_data as * mut ExtensionOptionsPrivateData ) ;
116+ drop ( private_data) ;
117+ options. private_data = std:: ptr:: null_mut ( ) ;
118+ }
116119}
117120
118121impl Default for FFI_ExtensionOptions {
Original file line number Diff line number Diff line change @@ -37,8 +37,7 @@ use datafusion_execution::config::SessionConfig;
3737#[ repr( C ) ]
3838#[ derive( Debug , StableAbi ) ]
3939pub struct FFI_SessionConfig {
40- /// Return a hash map from key to value of the config options represented
41- /// by string values.
40+ /// FFI stable configuration options.
4241 pub config_options : FFI_ConfigOptions ,
4342
4443 /// Used to create a clone on the provider of the execution plan. This should
You can’t perform that action at this time.
0 commit comments