瀏覽代碼

Fix analyzer warning about memory leak.

Jeff Kelley 7 年之前
父節點
當前提交
f45a3abf08
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Tests/Tests/AFSecurityPolicyTests.m

+ 1 - 1
Tests/Tests/AFSecurityPolicyTests.m

@@ -32,7 +32,7 @@ static SecTrustRef AFUTTrustChainForCertsInDirectory(NSString *directoryPath) {
     for (NSString *path in certFileNames) {
         NSData *certData = [NSData dataWithContentsOfFile:[directoryPath stringByAppendingPathComponent:path]];
         SecCertificateRef cert = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData));
-        [certs addObject:(__bridge id)(cert)];
+        [certs addObject:(__bridge_transfer id)(cert)];
     }
 
     SecPolicyRef policy = SecPolicyCreateBasicX509();