aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-04-27 17:41:27 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-09 19:34:56 +0800
commitdbfd14c60f1748e7608067a082d7a54434317440 (patch)
tree2f553e6e5081e2ace649f99a07d600c9dfdcba0d
parentfcd9a97dbf9c6bf6e9e8c7ecd7f8cacdb5c34b4e (diff)
downloadgsoc2013-empathy-dbfd14c60f1748e7608067a082d7a54434317440.tar
gsoc2013-empathy-dbfd14c60f1748e7608067a082d7a54434317440.tar.gz
gsoc2013-empathy-dbfd14c60f1748e7608067a082d7a54434317440.tar.bz2
gsoc2013-empathy-dbfd14c60f1748e7608067a082d7a54434317440.tar.lz
gsoc2013-empathy-dbfd14c60f1748e7608067a082d7a54434317440.tar.xz
gsoc2013-empathy-dbfd14c60f1748e7608067a082d7a54434317440.tar.zst
gsoc2013-empathy-dbfd14c60f1748e7608067a082d7a54434317440.zip
Don't leak the account and entity
-rw-r--r--libempathy-gtk/empathy-log-window.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 5a391c0c4..b19d6aaef 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -298,13 +298,16 @@ toolbutton_profile_clicked (GtkToolButton *toolbutton,
-1);
}
- g_return_if_fail (type == COL_TYPE_NORMAL);
-
- contact = empathy_contact_from_tpl_contact (account, target);
- empathy_contact_information_dialog_show (contact,
- GTK_WINDOW (window->window));
+ if (type == COL_TYPE_NORMAL)
+ {
+ contact = empathy_contact_from_tpl_contact (account, target);
+ empathy_contact_information_dialog_show (contact,
+ GTK_WINDOW (window->window));
+ g_object_unref (contact);
+ }
+ else
+ g_warn_if_reached ();
- g_object_unref (contact);
g_object_unref (account);
g_object_unref (target);
}