fixed two potential memory leaks when doing Analyze on iOS 9

This commit is contained in:
allenconquest 2016-04-19 15:40:05 +01:00 committed by Jesse MacFadyen
parent da7e85ec92
commit 3ded941ff3

View File

@ -142,6 +142,9 @@ static void CDVReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRe
retVal->reachabilityRef = reachability; retVal->reachabilityRef = reachability;
retVal->localWiFiRef = NO; retVal->localWiFiRef = NO;
} }
else {
CFRelease(reachability);
}
} }
return retVal; return retVal;
} }
@ -156,6 +159,9 @@ static void CDVReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRe
retVal->reachabilityRef = reachability; retVal->reachabilityRef = reachability;
retVal->localWiFiRef = NO; retVal->localWiFiRef = NO;
} }
else {
CFRelease(reachability);
}
} }
return retVal; return retVal;
} }