diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m index 67e51158e..4450fa87f 100644 --- a/platform/ios/MGLMapboxEvents.m +++ b/platform/ios/MGLMapboxEvents.m @@ -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;