From 5b0971f31f32837d3d75fd58253e9b9fc06379ac Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Mon, 8 Jun 2015 11:01:08 +0200 Subject: [PATCH] ContactDetailsTableViewController: avoid double-free crash clicking the second time on a contact SIP address due to CFBridgingRelease instead of __bridge cast --- Classes/ContactDetailsTableViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/ContactDetailsTableViewController.m b/Classes/ContactDetailsTableViewController.m index 27b987bc1..8079ea9f6 100644 --- a/Classes/ContactDetailsTableViewController.m +++ b/Classes/ContactDetailsTableViewController.m @@ -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);