From 751fc908860d947cee11ebbafabad66fade9960e Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 2 Aug 2016 09:30:40 +0200 Subject: [PATCH] Fix compilation errors. --- gtk/calllogs.c | 4 ++-- gtk/friendlist.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk/calllogs.c b/gtk/calllogs.c index 72a58ef0a..98daa9f12 100644 --- a/gtk/calllogs.c +++ b/gtk/calllogs.c @@ -317,8 +317,8 @@ void linphone_gtk_call_log_update(GtkWidget *w){ lf=linphone_core_get_friend_by_address(linphone_gtk_get_core(),addr); if(lf != NULL){ /*update display name from friend*/ - const char *name = linphone_friend_get_name(lf); - if (name != NULL) linphone_address_set_display_name(la, name); + display = linphone_friend_get_name(lf); + if (display != NULL) linphone_address_set_display_name(la, display); } else { display=linphone_address_get_display_name(la); } diff --git a/gtk/friendlist.c b/gtk/friendlist.c index 29e03aff3..5cd88995e 100644 --- a/gtk/friendlist.c +++ b/gtk/friendlist.c @@ -97,8 +97,8 @@ static void linphone_gtk_set_selection_to_uri_bar(GtkTreeView *treeview){ friend=linphone_address_as_string(addr); gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar")),friend); linphone_address_unref(addr); + ms_free(friend); } - ms_free(friend); } } @@ -608,7 +608,7 @@ static int get_friend_weight(const LinphoneFriend *lf){ int w=0; LinphoneCore *lc=linphone_gtk_get_core(); LinphoneAddress *addr = linphone_friend_get_address(lf); - LinphoneChatRoom *cr; + LinphoneChatRoom *cr = NULL; if (addr != NULL) { cr = linphone_core_get_chat_room(lc, addr);