Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Commit

Permalink
Fix memory leak in BITKeyChainUtils
Browse files Browse the repository at this point in the history
Fixes #68
  • Loading branch information
DerAndereAndi committed Oct 2, 2013
1 parent 445d684 commit f92fcbb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/BITKeychainUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ + (NSString *) getPasswordForUsername: (NSString *) username andServiceName: (NS
[attributeQuery setObject: (id) kCFBooleanTrue forKey:(__bridge_transfer id) kSecReturnAttributes];
CFTypeRef attrResult = NULL;
OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef) attributeQuery, &attrResult);
//NSDictionary *attributeResult = (__bridge_transfer NSDictionary *)attrResult;
// NSDictionary *attributeResult = (__bridge_transfer NSDictionary *)attrResult;
if (attrResult)
CFRelease(attrResult);

if (status != noErr) {
// No existing item found--simply return nil for the password
Expand Down

0 comments on commit f92fcbb

Please sign in to comment.