Skip to content

Commit a46de75

Browse files
author
David John
committed
fix(osx): leaked CFDictionary object allocated by IORegistryEntryCreateCFProperties
1 parent 0568d60 commit a46de75

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/macos.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ pub fn enumerate_platform(vid: Option<u16>, pid: Option<u16>) -> Vec<UsbDevice>
3939

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

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

0 commit comments

Comments
 (0)