Skip to content

Commit

Permalink
Merge pull request #96 from AravinthChandran/master
Browse files Browse the repository at this point in the history
Fix static analysis errors .
  • Loading branch information
kishikawakatsumi committed Jun 16, 2015
2 parents 7ed3396 + 016d3cb commit e89d796
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Lib/UICKeyChainStore/UICKeyChainStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,9 @@ + (NSArray *)allKeysWithItemClass:(UICKeyChainStoreItemClass)itemClass
query[(__bridge __strong id)kSecReturnAttributes] = (__bridge id)kCFBooleanTrue;

CFArrayRef result = nil;
OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query,(CFTypeRef *)&result);
CFDictionaryRef cfquery = (CFDictionaryRef)CFBridgingRetain(query);
OSStatus status = SecItemCopyMatching(cfquery,(CFTypeRef *)&result);
CFRelease(cfquery);

if (status == errSecSuccess) {
NSArray *items = [self prettify:itemClassObject items:(__bridge NSArray *)result];
Expand Down Expand Up @@ -822,7 +824,9 @@ + (NSArray *)allItemsWithItemClass:(UICKeyChainStoreItemClass)itemClass
#endif

CFArrayRef result = nil;
OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query,(CFTypeRef *)&result);
CFDictionaryRef cfquery = (CFDictionaryRef)CFBridgingRetain(query);
OSStatus status = SecItemCopyMatching(cfquery,(CFTypeRef *)&result);
CFRelease(cfquery);

if (status == errSecSuccess) {
return [self prettify:itemClassObject items:(__bridge NSArray *)result];
Expand Down

0 comments on commit e89d796

Please sign in to comment.