소스 검색

Fixed memory corruption under non-ARC

Pierre-Olivier Latour 11 년 전
부모
커밋
7b51023373
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      CGDWebServer/GCDWebServer.m

+ 1 - 1
CGDWebServer/GCDWebServer.m

@@ -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);