Skip to content

Commit

Permalink
Misc formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
emesare committed Jan 12, 2025
1 parent 8817d93 commit 12fe44d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions rust/binaryninjacore-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,7 @@ fn main() {
// Make a symlink "libbinaryninjacore.so" pointing to "libbinaryninjacore.so.1"
if symlink_target.exists() && symlink_source.symlink_metadata().is_err() {
use std::os::unix::fs;
fs::symlink(
symlink_target,
symlink_source,
)
.expect("failed to create required symlink");
fs::symlink(symlink_target, symlink_source).expect("failed to create required symlink");
}
println!("cargo:rustc-link-search={}", out_dir);
}
Expand Down
2 changes: 1 addition & 1 deletion rust/src/disassembly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ impl InstructionTextToken {
kind,
}
}

pub(crate) unsafe fn free_raw(raw: BNInstructionTextToken) {
if !raw.text.is_null() {
BNFreeString(raw.text);
Expand Down
2 changes: 1 addition & 1 deletion rust/src/typeprinter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ impl From<TypeDefinitionLine> for BNTypeDefinitionLine {
// NOTE: This is leaking tokens. Must free with `cb_free_lines`.
tokens: Box::leak(tokens).as_mut_ptr(),
// NOTE: This is leaking a ref to ty. Must free with `cb_free_lines`.
type_: unsafe { BNNewTypeReference(value.ty.handle) },
type_: unsafe { BNNewTypeReference(value.ty.handle) },
// NOTE: This is leaking a ref to parent_type. Must free with `cb_free_lines`.
parentType: value
.parent_type
Expand Down

0 comments on commit 12fe44d

Please sign in to comment.