Fixing static analyzer warnings about CFRelease calls to NULL pointer
This commit is contained in:
parent
bcf35c2354
commit
0c38a6ca2d
1 changed files with 6 additions and 4 deletions
|
|
@ -244,9 +244,10 @@ static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) {
|
||||||
[publicKeys addObject:(__bridge_transfer id)allowedPublicKey];
|
[publicKeys addObject:(__bridge_transfer id)allowedPublicKey];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
CFRelease(allowedTrust);
|
||||||
CFRelease(allowedTrust);
|
}
|
||||||
|
|
||||||
CFRelease(policy);
|
CFRelease(policy);
|
||||||
CFRelease(certificates);
|
CFRelease(certificates);
|
||||||
CFRelease(allowedCertificate);
|
CFRelease(allowedCertificate);
|
||||||
|
|
@ -605,9 +606,10 @@ willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challe
|
||||||
if (status == errSecSuccess) {
|
if (status == errSecSuccess) {
|
||||||
[trustChain addObject:(__bridge_transfer id)SecTrustCopyPublicKey(trust)];
|
[trustChain addObject:(__bridge_transfer id)SecTrustCopyPublicKey(trust)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CFRelease(trust);
|
||||||
}
|
}
|
||||||
|
|
||||||
CFRelease(trust);
|
|
||||||
CFRelease(certificates);
|
CFRelease(certificates);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue