]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Kernel/IOSimpleReporter.cpp
xnu-4570.51.1.tar.gz
[apple/xnu.git] / iokit / Kernel / IOSimpleReporter.cpp
index 81c8232eb902e02ec2574f5e6c0dd1c936ecf273..de430f56608730910ece14fd441e3925e276e3eb 100644 (file)
@@ -37,7 +37,7 @@ OSDefineMetaClassAndStructors(IOSimpleReporter, IOReporter);
 IOSimpleReporter*
 IOSimpleReporter::with(IOService *reportingService,
                        IOReportCategories categories,
-                       IOReportUnits unit)
+                       IOReportUnit unit)
 {
     IOSimpleReporter *reporter, *rval = NULL;
 
@@ -56,7 +56,7 @@ IOSimpleReporter::with(IOService *reportingService,
     
 finish:
     if (!rval) {
-        if (reporter)       delete reporter;
+        OSSafeReleaseNULL(reporter);
     }
     
     return rval;
@@ -65,7 +65,7 @@ finish:
 bool
 IOSimpleReporter::initWith(IOService *reportingService,
                            IOReportCategories categories,
-                           IOReportUnits unit)
+                           IOReportUnit unit)
 {
     // fully specify the channel type for the superclass
     IOReportChannelType channelType = {