Skip to content

Commit

Permalink
Fix memory leak in StaticSnapshot::drop
Browse files Browse the repository at this point in the history
  • Loading branch information
mappum committed Sep 18, 2023
1 parent b5ec5d3 commit 8a9165e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/merk/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ impl StaticSnapshot {
pub unsafe fn drop<'a>(self, db: &'a rocksdb::DB) {
let mut ss = self.with_db(db);
ManuallyDrop::drop(&mut ss);
drop(self.tree);
std::mem::forget(self);
}

Expand Down

0 comments on commit 8a9165e

Please sign in to comment.