Skip to content

Commit

Permalink
fix(osx): leaked CFDictionary object allocated by IORegistryEntryCrea…
Browse files Browse the repository at this point in the history
…teCFProperties (#8)
  • Loading branch information
radiohertz authored Oct 28, 2024
1 parent e600c52 commit 6cb7148
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub fn enumerate_platform(vid: Option<u16>, pid: Option<u16>) -> Vec<UsbDevice>

let properties: CFDictionary<CFString, CFType> =
CFMutableDictionary::wrap_under_get_rule(props).to_immutable();
CFRelease(props.as_void_ptr());

let _ = || -> Result<(), Box<dyn Error>> {
let key = CFString::from_static_string("idVendor");
Expand Down

0 comments on commit 6cb7148

Please sign in to comment.