mirror of
https://gitee.com/shuto/cordova-plugin-network-information.git
synced 2025-01-19 05:52:49 +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->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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user