diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-02-17 18:59:21 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-02-17 21:47:39 +0800 |
commit | 84b316b42725de82000353a9650e9304f5d4f825 (patch) | |
tree | 08dc1035d53dd1c2c72b88caed198304dcf0f696 | |
parent | 9cae8fb44d9d76ad88d09527f48192dffba57711 (diff) | |
download | gsoc2013-empathy-84b316b42725de82000353a9650e9304f5d4f825.tar gsoc2013-empathy-84b316b42725de82000353a9650e9304f5d4f825.tar.gz gsoc2013-empathy-84b316b42725de82000353a9650e9304f5d4f825.tar.bz2 gsoc2013-empathy-84b316b42725de82000353a9650e9304f5d4f825.tar.lz gsoc2013-empathy-84b316b42725de82000353a9650e9304f5d4f825.tar.xz gsoc2013-empathy-84b316b42725de82000353a9650e9304f5d4f825.tar.zst gsoc2013-empathy-84b316b42725de82000353a9650e9304f5d4f825.zip |
empathy_protocol_chooser_create_account_settings: ensure that cm is always unrefed
-rw-r--r-- | libempathy-gtk/empathy-protocol-chooser.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c index 689f6a28a..6e6b8bb79 100644 --- a/libempathy-gtk/empathy-protocol-chooser.c +++ b/libempathy-gtk/empathy-protocol-chooser.c @@ -561,16 +561,16 @@ empathy_protocol_chooser_set_visible (EmpathyProtocolChooser *protocol_chooser, EmpathyAccountSettings * empathy_protocol_chooser_create_account_settings (EmpathyProtocolChooser *self) { - EmpathyAccountSettings *settings; + EmpathyAccountSettings *settings = NULL; gchar *str; const gchar *display_name; TpConnectionManager *cm; TpConnectionManagerProtocol *proto; - gchar *service; + gchar *service = NULL; cm = empathy_protocol_chooser_dup_selected (self, &proto, &service); if (cm == NULL || proto == NULL) - return NULL; + goto out; if (service != NULL) display_name = empathy_service_name_to_display_name (service); @@ -609,7 +609,8 @@ empathy_protocol_chooser_create_account_settings (EmpathyProtocolChooser *self) "chat.facebook.com"); } - g_object_unref (cm); +out: + tp_clear_object (&cm); g_free (service); return settings; } |