aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-30 16:18:10 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-30 17:20:59 +0800
commit6af5464b86a9e013ffc36b5243055c5c0d8495f9 (patch)
tree363d8dc74990d1d2b95c3df045062d8db269d791 /src
parentc9c1f10a1684e62f9e628974206578bb2f79ace3 (diff)
downloadgsoc2013-empathy-6af5464b86a9e013ffc36b5243055c5c0d8495f9.tar
gsoc2013-empathy-6af5464b86a9e013ffc36b5243055c5c0d8495f9.tar.gz
gsoc2013-empathy-6af5464b86a9e013ffc36b5243055c5c0d8495f9.tar.bz2
gsoc2013-empathy-6af5464b86a9e013ffc36b5243055c5c0d8495f9.tar.lz
gsoc2013-empathy-6af5464b86a9e013ffc36b5243055c5c0d8495f9.tar.xz
gsoc2013-empathy-6af5464b86a9e013ffc36b5243055c5c0d8495f9.tar.zst
gsoc2013-empathy-6af5464b86a9e013ffc36b5243055c5c0d8495f9.zip
don't leak the classes list
Diffstat (limited to 'src')
-rw-r--r--src/empathy-new-chatroom-dialog.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c
index 11bf0835c..c814e4433 100644
--- a/src/empathy-new-chatroom-dialog.c
+++ b/src/empathy-new-chatroom-dialog.c
@@ -484,6 +484,7 @@ new_chatroom_dialog_account_changed_cb (GtkComboBox *combobox,
gboolean expanded = FALSE;
TpConnection *connection;
EmpathyDispatcher *dispatcher;
+ GList *classes = NULL;
if (dialog->room_list) {
g_object_unref (dialog->room_list);
@@ -509,12 +510,19 @@ new_chatroom_dialog_account_changed_cb (GtkComboBox *combobox,
dispatcher = empathy_dispatcher_dup_singleton ();
- if (connection != NULL &&
- empathy_dispatcher_find_requestable_channel_classes (dispatcher,
- connection, TP_IFACE_CHANNEL_TYPE_ROOM_LIST,
- TP_HANDLE_TYPE_NONE, NULL) != NULL) {
+ if (connection != NULL) {
+ classes = empathy_dispatcher_find_requestable_channel_classes (dispatcher,
+ connection, TP_IFACE_CHANNEL_TYPE_ROOM_LIST,
+ TP_HANDLE_TYPE_NONE, NULL);
+ }
+
+ if (classes != NULL) {
/* Roomlist channels are supported */
dialog->room_list = empathy_tp_roomlist_new (dialog->account);
+ g_list_free (classes);
+ }
+ else {
+ dialog->room_list = NULL;
}
g_object_unref (dispatcher);