Skip to content

Commit

Permalink
Fixed bad access of phone label string
Browse files Browse the repository at this point in the history
FIxed memory leak of peoples array
  • Loading branch information
belkevich committed Feb 26, 2014
1 parent 012ba8a commit c22f436
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions Classes/APAddressBook.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ - (void)loadContacts:(void (^)(NSArray *contacts, NSError *error))callbackBlock
}
[contacts sortUsingDescriptors:descriptors];
array = contacts.copy;
CFRelease(peopleArrayRef);
}
else if (errorRef)
{
Expand Down
1 change: 0 additions & 1 deletion Classes/APContact.m
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ - (NSString *)localizedLabelFromMultiValue:(ABMultiValueRef)multiValue index:(NS
if (localizedLabel)
{
label = (__bridge_transfer NSString *)localizedLabel;
CFRelease(localizedLabel);
}
CFRelease(rawLabel);
}
Expand Down

0 comments on commit c22f436

Please sign in to comment.