[empathy] select_account_once_ready: free the account and ID to avoid leaks



commit 647d188902cbd616ad2a3681e9b3062fad46d31c
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Aug 12 10:55:12 2010 +0200

    select_account_once_ready: free the account and ID to avoid leaks

 libempathy-gtk/empathy-log-window.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index df41225..8e2bb68 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -194,8 +194,12 @@ select_account_once_ready (EmpathyLogWindow *self,
 {
 	EmpathyAccountChooser *account_chooser = EMPATHY_ACCOUNT_CHOOSER (self->account_chooser_chats);
 
+	tp_clear_object (&self->selected_account);
 	self->selected_account = g_object_ref (account);
+
+	g_free (self->selected_chat_id);
 	self->selected_chat_id = g_strdup (chat_id);
+
 	self->selected_is_chatroom = is_chatroom;
 
 	if (empathy_account_chooser_is_ready (account_chooser))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]