From 8ff2f04ab7acc8b7905afdbce9bd45e62d7e3e28 Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Mon, 24 Feb 2014 14:02:33 +0100 Subject: [PATCH] Fix bis returning bad address and memleak --- Classes/LinphoneUI/UICallButton.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Classes/LinphoneUI/UICallButton.m b/Classes/LinphoneUI/UICallButton.m index 0b4dbf721..907c7f600 100644 --- a/Classes/LinphoneUI/UICallButton.m +++ b/Classes/LinphoneUI/UICallButton.m @@ -76,9 +76,10 @@ LinphoneCallLog* log = logs->data; if( linphone_call_log_get_dir(log) == LinphoneCallOutgoing ){ LinphoneAddress* to = linphone_call_log_get_to(log); - [addressField setText:[NSString stringWithUTF8String:linphone_address_as_string(to)]]; - address = [addressField text]; - // only fill thge address, let the user confirm the call by pressing again + char *bis_address = linphone_address_as_string_uri_only(to); + [addressField setText:[NSString stringWithUTF8String:bis_address]]; + ms_free(bis_address); + // return after filling the address, let the user confirm the call by pressing again return; } logs = ms_list_next(logs);