Skip to content

Commit 2ff2fd5

Browse files
committed
Merge branch 'experimental-reachability-leak-fix'
2 parents 6b892ae + 314afe9 commit 2ff2fd5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

AFNetworking/AFHTTPClient.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,11 @@ static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused targ
310310
return (__bridge_retained const void *)([(__bridge AFNetworkReachabilityStatusBlock)info copy]);
311311
}
312312

313-
static void AFNetworkReachabilityReleaseCallback(__unused const void *info) {}
313+
static void AFNetworkReachabilityReleaseCallback(const void *info) {
314+
if (info) {
315+
CFRelease(info);
316+
}
317+
}
314318

315319
- (void)startMonitoringNetworkReachability {
316320
[self stopMonitoringNetworkReachability];

0 commit comments

Comments
 (0)