From 9dea523c34a7acdeacea95c8908d113e4486bd38 Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Thu, 11 Aug 2011 16:06:42 -0400 Subject: [PATCH] * #6623: fixed more leaks --- sflphone-client-gnome/src/actions.c | 2 ++ sflphone-client-gnome/src/uimanager.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index 62457c518b..793c506fa2 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -770,6 +770,8 @@ sflphone_new_call() peer_number = g_strdup (""); peer_name = g_strdup (""); create_new_call (CALL, CALL_STATE_DIALING, "", "", peer_name, peer_number, &c); + g_free(peer_number); + g_free(peer_name); c->_history_state = OUTGOING; diff --git a/sflphone-client-gnome/src/uimanager.c b/sflphone-client-gnome/src/uimanager.c index afb9e83016..32a6c6a844 100644 --- a/sflphone-client-gnome/src/uimanager.c +++ b/sflphone-client-gnome/src/uimanager.c @@ -1017,6 +1017,8 @@ call_mailbox_cb (void) create_new_call (CALL, CALL_STATE_DIALING, "", account_id, _ ("Voicemail"), to, &mailbox_call); + g_free(to); + g_free(account_id); DEBUG ("TO : %s" , mailbox_call->_peer_number); calllist_add_call (current_calls, mailbox_call); calltree_add_call (current_calls, mailbox_call, NULL); @@ -1678,8 +1680,8 @@ ok_cb (GtkWidget *widget UNUSED, gpointer userdata) original = (callable_obj_t*) userdata; // Create the new call - create_new_call (CALL, CALL_STATE_DIALING, "", g_strdup (original->_accountID), - original->_peer_name, g_strdup (new_number), &modified_call); + create_new_call (CALL, CALL_STATE_DIALING, "", original->_accountID, + original->_peer_name, new_number, &modified_call); // Update the internal data structure and the GUI calllist_add_call (current_calls, modified_call); @@ -1724,7 +1726,7 @@ show_edit_number (callable_obj_t *call) #endif if (call) - gtk_entry_set_text (GTK_ENTRY (editable_num), g_strdup (call->_peer_number)); + gtk_entry_set_text (GTK_ENTRY (editable_num), call->_peer_number); else ERROR ("This a bug, the call should be defined. menus.c line 1051"); -- GitLab