From ec3757309f6db3ad5a583129c62f245893ecb72f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 5 May 2015 12:10:44 -0400 Subject: [PATCH] Fixed leaks of copied CF objects --- platform/ios/MGLMapboxEvents.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;