X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/fe8ab488e9161c46dd9885d58fc52996dc0249ff..a39ff7e25e19b3a8c3020042a3872ca9ec9659f1:/iokit/Kernel/IOStateReporter.cpp?ds=inline diff --git a/iokit/Kernel/IOStateReporter.cpp b/iokit/Kernel/IOStateReporter.cpp index 0eaeb6f1d..e1214dc55 100644 --- a/iokit/Kernel/IOStateReporter.cpp +++ b/iokit/Kernel/IOStateReporter.cpp @@ -40,7 +40,7 @@ IOStateReporter* IOStateReporter::with(IOService *reportingService, IOReportCategories categories, int nstates, - IOReportUnits unit/* = kIOReportUnitHWTicks*/) + IOReportUnit unit/* = kIOReportUnitHWTicks*/) { IOStateReporter *reporter, *rval = NULL; @@ -58,7 +58,7 @@ IOStateReporter::with(IOService *reportingService, finish: if (!rval) { - if (reporter) delete reporter; + OSSafeReleaseNULL(reporter); } return rval; @@ -68,7 +68,7 @@ bool IOStateReporter::initWith(IOService *reportingService, IOReportCategories categories, int16_t nstates, - IOReportUnits unit) + IOReportUnit unit) { bool success = false; @@ -778,6 +778,7 @@ IOStateReporter::_getStateValue(uint64_t channel_id, break; case kLastTransitionTime: result = values->last_intransition; + break; default: break; }