Avoids freeing null values

pull/190/head
Tpt 3 years ago
parent f069d85426
commit b9ef40df07
  1. 2
      lib/src/storage/backend/rocksdb.rs

@ -1012,7 +1012,7 @@ unsafe impl Sync for ErrorStatus {}
impl Drop for ErrorStatus { impl Drop for ErrorStatus {
fn drop(&mut self) { fn drop(&mut self) {
if self.0.string.is_null() { if !self.0.string.is_null() {
unsafe { unsafe {
free(self.0.string as *mut c_void); free(self.0.string as *mut c_void);
} }

Loading…
Cancel
Save