Skip to content

Commit

Permalink
Fixed analyzer warnings
Browse files Browse the repository at this point in the history
This fixes a warning produced by the static analyzer.
  • Loading branch information
davbeck authored and f2prateek committed Jun 30, 2016
1 parent b8aed96 commit bad7259
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Pod/Classes/Internal/SEGReachability.m
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ + (SEGReachability *)reachabilityWithHostname:(NSString *)hostname
SCNetworkReachabilityRef ref = SCNetworkReachabilityCreateWithName(NULL, [hostname UTF8String]);
if (ref) {
id reachability = [[self alloc] initWithReachabilityRef:ref];
CFRelease(ref);

#if __has_feature(objc_arc)
return reachability;
Expand All @@ -129,6 +130,7 @@ + (SEGReachability *)reachabilityWithAddress:(const struct sockaddr_in *)hostAdd
SCNetworkReachabilityRef ref = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)hostAddress);
if (ref) {
id reachability = [[self alloc] initWithReachabilityRef:ref];
CFRelease(ref);

#if __has_feature(objc_arc)
return reachability;
Expand Down Expand Up @@ -171,6 +173,7 @@ - (SEGReachability *)initWithReachabilityRef:(SCNetworkReachabilityRef)ref
if (self != nil) {
self.reachableOnWWAN = YES;
self.reachabilityRef = ref;
CFRetain(self.reachabilityRef);
}

return self;
Expand Down

0 comments on commit bad7259

Please sign in to comment.