diff --git a/src/ios/CDVReachability.m b/src/ios/CDVReachability.m index c60261a..1399867 100644 --- a/src/ios/CDVReachability.m +++ b/src/ios/CDVReachability.m @@ -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; }