mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
fix: supply a real ptr to mdbx_dbi_flags_ex (#21230)
This commit is contained in:
@@ -223,7 +223,11 @@ where
|
||||
let mut flags: c_uint = 0;
|
||||
unsafe {
|
||||
self.txn_execute(|txn| {
|
||||
mdbx_result(ffi::mdbx_dbi_flags_ex(txn, dbi, &mut flags, ptr::null_mut()))
|
||||
// `mdbx_dbi_flags_ex` requires `status` to be a non-NULL ptr, otherwise it will
|
||||
// return an EINVAL and panic below, so we just provide a placeholder variable
|
||||
// which we discard immediately.
|
||||
let mut _status: c_uint = 0;
|
||||
mdbx_result(ffi::mdbx_dbi_flags_ex(txn, dbi, &mut flags, &mut _status))
|
||||
})??;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user