From 3ded941ff31db832f0b1ffa97cacb65350ca34c5 Mon Sep 17 00:00:00 2001 From: allenconquest Date: Tue, 19 Apr 2016 15:40:05 +0100 Subject: [PATCH] fixed two potential memory leaks when doing Analyze on iOS 9 --- src/ios/CDVReachability.m | 6 ++++++ 1 file changed, 6 insertions(+) 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; }