ContactDetailsTableViewController: avoid double-free crash clicking the second time on a contact SIP address due to CFBridgingRelease instead of __bridge cast

This commit is contained in:
Gautier Pelloux-Prayer 2015-06-08 11:01:08 +02:00
parent e086e81515
commit 5b0971f31f

View file

@ -594,7 +594,7 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
ABMultiValueRef lMap = ABRecordCopyValue(contact, kABPersonInstantMessageProperty);
NSInteger index = ABMultiValueGetIndexForIdentifier(lMap, [entry identifier]);
CFDictionaryRef lDict = ABMultiValueCopyValueAtIndex(lMap, index);
NSString* valueRef = CFBridgingRelease(CFDictionaryGetValue(lDict, kABPersonInstantMessageUsernameKey));
NSString* valueRef = (__bridge NSString*)(CFDictionaryGetValue(lDict, kABPersonInstantMessageUsernameKey));
dest = [FastAddressBook normalizeSipURI:(NSString*) valueRef];
CFRelease(lDict);
CFRelease(lMap);