From b9ef40df071a2ce4eb7624a1ded025ce6c5b1e61 Mon Sep 17 00:00:00 2001 From: Tpt Date: Sun, 16 Jan 2022 14:13:29 +0100 Subject: [PATCH] Avoids freeing null values --- lib/src/storage/backend/rocksdb.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/storage/backend/rocksdb.rs b/lib/src/storage/backend/rocksdb.rs index 0d8b53b5..e3798220 100644 --- a/lib/src/storage/backend/rocksdb.rs +++ b/lib/src/storage/backend/rocksdb.rs @@ -1012,7 +1012,7 @@ unsafe impl Sync for ErrorStatus {} impl Drop for ErrorStatus { fn drop(&mut self) { - if self.0.string.is_null() { + if !self.0.string.is_null() { unsafe { free(self.0.string as *mut c_void); }