Browse Source

Fix analyzer warning about memory leak.

Jeff Kelley 7 years ago
parent
commit
f45a3abf08
1 changed files with 1 additions and 1 deletions
  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();