Unverified Commit f6922984 authored by Qi Yu's avatar Qi Yu Committed by GitHub

Fix WriteBatch::iterate memory leak (#658)

Fix https://github.com/tikv/rust-rocksdb/issues/654Signed-off-by: 's avataryuqi1129 <yuqi4733@gmail.com>
parent 9d98e4ee
...@@ -124,6 +124,8 @@ impl WriteBatch { ...@@ -124,6 +124,8 @@ impl WriteBatch {
delete_fn, delete_fn,
delete_cf_fn, delete_cf_fn,
); );
// Let rust free the memory
let _ = Box::from_raw(state as *mut WriteBatchCallback);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment