Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed analyzer warnings #517

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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