mirror of
https://gitee.com/shuto/cordova-plugin-network-information.git
synced 2025-01-18 21:52:48 +08:00
fixed two potential memory leaks when doing Analyze on iOS 9
This commit is contained in:
parent
da7e85ec92
commit
3ded941ff3
@ -142,6 +142,9 @@ static void CDVReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRe
|
||||
retVal->reachabilityRef = reachability;
|
||||
retVal->localWiFiRef = NO;
|
||||
}
|
||||
else {
|
||||
CFRelease(reachability);
|
||||
}
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
@ -156,6 +159,9 @@ static void CDVReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRe
|
||||
retVal->reachabilityRef = reachability;
|
||||
retVal->localWiFiRef = NO;
|
||||
}
|
||||
else {
|
||||
CFRelease(reachability);
|
||||
}
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user