Commit 4e05987b authored by Tristan Matthews's avatar Tristan Matthews

* #7111: gnome: fix double free crasher on edit->paste

parent 41c52ade
......@@ -61,7 +61,6 @@ conference_obj_t *create_new_conference(conference_state_t state, const gchar* c
// set conference timestamp
time(&new_conf->_time_start);
g_assert(new_conf->_im_widget == NULL);
return new_conf;
}
......
......@@ -1207,6 +1207,7 @@ void calltree_remove_conference (calltab_t* tab, const conference_obj_t* conf)
{
DEBUG ("CallTree: Remove conference %s", conf->_confID);
calltree_remove_conference_recursive(tab, conf, NULL);
DEBUG ("CallTree: Finished Removing conference");
}
void calltree_add_history_conference(conference_obj_t *conf)
......
......@@ -836,10 +836,10 @@ edit_paste(void * foo UNUSED)
case CALL_STATE_DIALING:
{
/* Add the text to the number */
gchar *before = selectedCall->_peer_number;
DEBUG("TO: %s\n", before);
selectedCall->_peer_number = g_strconcat(before, no, NULL);
g_free(before);
gchar *old = selectedCall->_peer_number;
DEBUG("TO: %s\n", old);
selectedCall->_peer_number = g_strconcat(old, no, NULL);
g_free(old);
if (selectedCall->_state == CALL_STATE_DIALING)
selectedCall->_peer_info = g_strconcat("\"\" <",
......@@ -855,9 +855,9 @@ edit_paste(void * foo UNUSED)
case CALL_STATE_HOLD: { // Create a new call to hold the new text
selectedCall = sflphone_new_call();
g_free(selectedCall->_peer_number);
selectedCall->_peer_number = g_strconcat(selectedCall->_peer_number,
no, NULL);
gchar *old = selectedCall->_peer_number;
selectedCall->_peer_number = g_strconcat(old, no, NULL);
g_free(old);
DEBUG("TO: %s", selectedCall->_peer_number);
g_free(selectedCall->_peer_info);
......@@ -875,8 +875,8 @@ edit_paste(void * foo UNUSED)
DEBUG("<%s>", oneNo);
dbus_play_dtmf(oneNo);
gchar * temp = g_strconcat(selectedCall->_peer_number, oneNo,
NULL);
gchar * temp = g_strconcat(selectedCall->_peer_number,
oneNo, NULL);
g_free(selectedCall->_peer_info);
selectedCall->_peer_info = get_peer_info(temp, selectedCall->_peer_name);
g_free(temp);
......@@ -889,12 +889,9 @@ edit_paste(void * foo UNUSED)
} else { // There is no current call, create one
selectedCall = sflphone_new_call();
gchar * before = selectedCall->_peer_number;
gchar *new_peer_number = g_strconcat(selectedCall->_peer_number, no,
NULL);
g_free(selectedCall->_peer_number);
selectedCall->_peer_number = new_peer_number;
g_free(before);
gchar * old = selectedCall->_peer_number;
selectedCall->_peer_number = g_strconcat(old, no, NULL);
g_free(old);
DEBUG("UIManager: TO: %s", selectedCall->_peer_number);
g_free(selectedCall->_peer_info);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment