Skip to content

fix: only release ref when fetch thermal return success - #2226

Closed
STRRL wants to merge 2 commits into
prometheus:masterfrom
STRRL:fix-2218
Closed

STRRL wants to merge 2 commits into
prometheus:masterfrom
STRRL:fix-2218

Conversation

@STRRL

@STRRL STRRL commented Nov 27, 2021 •

Copy link
Copy Markdown
Contributor

Signed-off-by: STRRL [email protected]

fix: #2218

thermal collector for Apple M1 might not work well, because IOPMCopyCPUPowerStatus returns nothing on Apple M1.

This PR only fix the panic crash on Apple M1.

Changes:

  • Only release the reference when FetchThermal() returns kIOReturnSuccess

@STRRL

STRRL commented Nov 27, 2021

Copy link
Copy Markdown
Contributor Author

duplicated with #2225

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SIGTRAP: trace trap on M1

1 participant