27 Feb
2023
27 Feb
'23
8:50 p.m.
Brendan Shanks (@bshanks) commented about dlls/ntdll/unix/system.c:
- CFTimeInterval remain; - - if (IOPMCopyBatteryInfo( 0, &batteries ) != kIOReturnSuccess) + CFTypeRef blob = IOPSCopyPowerSourcesInfo(); + CFArrayRef sources = IOPSCopyPowerSourcesList( blob ); + CFDictionaryRef source = NULL; + CFTypeRef prop; + Boolean is_charging; + int32_t value, voltage; + + if (!sources) + { + if (blob) CFRelease( blob ); return STATUS_ACCESS_DENIED; + }
You can `CFRelease(blob)` at this point, and then remove all the calls from later in the function -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2283#note_25622