Added guard around adding a NULL object to an array
This commit is contained in:
parent
5b633898b3
commit
c8e420990e
1 changed files with 2 additions and 1 deletions
|
|
@ -224,7 +224,8 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat
|
||||||
|
|
||||||
SecKeyRef allowedPublicKey = SecTrustCopyPublicKey(allowedTrust);
|
SecKeyRef allowedPublicKey = SecTrustCopyPublicKey(allowedTrust);
|
||||||
NSCParameterAssert(allowedPublicKey);
|
NSCParameterAssert(allowedPublicKey);
|
||||||
[publicKeys addObject:(__bridge_transfer id)allowedPublicKey];
|
if(allowedPublicKey!=NULL)
|
||||||
|
[publicKeys addObject:(__bridge_transfer id)allowedPublicKey];
|
||||||
|
|
||||||
CFRelease(allowedTrust);
|
CFRelease(allowedTrust);
|
||||||
CFRelease(policy);
|
CFRelease(policy);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue