Fixed memory corruption under non-ARC

This commit is contained in:
Pierre-Olivier Latour 2014-04-10 20:19:37 -07:00
parent f21c6ab667
commit 7b51023373

View File

@ -239,7 +239,7 @@ NSString* GCDWebServerGetPrimaryIPv4Address() {
if (store) {
CFPropertyListRef info = SCDynamicStoreCopyValue(store, CFSTR("State:/Network/Global/IPv4"));
if (info) {
primaryInterface = [[(ARC_BRIDGE NSDictionary*)info objectForKey:@"PrimaryInterface"] UTF8String];
primaryInterface = [[NSString stringWithString:[(ARC_BRIDGE NSDictionary*)info objectForKey:@"PrimaryInterface"]] UTF8String];
CFRelease(info);
}
CFRelease(store);