Fixed leaks of copied CF objects
This commit is contained in:
@@ -617,10 +617,11 @@ NSString *const MGLEventGestureRotateStart = @"Rotation";
|
||||
NSString *ssid = nil;
|
||||
CFArrayRef interfaces = CNCopySupportedInterfaces();
|
||||
if (interfaces) {
|
||||
NSDictionary *info = (__bridge NSDictionary *)CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(interfaces, 0));
|
||||
NSDictionary *info = CFBridgingRelease(CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(interfaces, 0)));
|
||||
if (info) {
|
||||
ssid = info[@"SSID"];
|
||||
}
|
||||
CFRelease(interfaces);
|
||||
}
|
||||
|
||||
return ssid;
|
||||
|
||||
Reference in New Issue
Block a user