Skip to content

Commit 4536b9c

Browse files
emesareplafosse
authored andcommitted
Fix memory leak in when calling Metadata::get_value_store in Rust API
Forgot to free the `BNMetadataValueStore` object returned by core
1 parent 5eb44f7 commit 4536b9c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rust/src/metadata.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ impl Metadata {
239239
};
240240
map.insert(key, value);
241241
}
242+
243+
unsafe { BNFreeMetadataValueStore(ptr) };
242244

243245
Ok(map)
244246
}

0 commit comments

Comments
 (0)