From 27e9e1102f2ab003d85ebf62077557db5dd1dfac Mon Sep 17 00:00:00 2001 From: Curtis Liu Date: Wed, 29 Oct 2014 16:03:32 -0700 Subject: [PATCH] SAFE_ARC_RETAIN CTTelephonyNetworkInfo object --- DeviceInfo.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DeviceInfo.m b/DeviceInfo.m index 5cd2fc33..88fa9ac9 100644 --- a/DeviceInfo.m +++ b/DeviceInfo.m @@ -64,7 +64,7 @@ -(NSString*) phoneCarrier { SEL subscriberCellularProvider = NSSelectorFromString(@"subscriberCellularProvider"); SEL carrierName = NSSelectorFromString(@"carrierName"); if (CTTelephonyNetworkInfo && subscriberCellularProvider && carrierName) { - networkInfo = [[NSClassFromString(@"CTTelephonyNetworkInfo") alloc] init]; + networkInfo = SAFE_ARC_RETAIN([[NSClassFromString(@"CTTelephonyNetworkInfo") alloc] init]); id carrier = nil; id (*imp1)(id, SEL) = (id (*)(id, SEL))[networkInfo methodForSelector:subscriberCellularProvider]; if (imp1) {