diff options
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-server-tls-handler.c | 10 | ||||
-rw-r--r-- | libempathy/empathy-tls-certificate.c | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/libempathy/empathy-server-tls-handler.c b/libempathy/empathy-server-tls-handler.c index feabdfbcd..10a2daf20 100644 --- a/libempathy/empathy-server-tls-handler.c +++ b/libempathy/empathy-server-tls-handler.c @@ -20,6 +20,8 @@ #include "empathy-server-tls-handler.h" +#include <telepathy-glib/util.h> + #define DEBUG_FLAG EMPATHY_DEBUG_TLS #include "empathy-debug.h" #include "empathy-tls-certificate.h" @@ -74,6 +76,7 @@ tls_certificate_constructed_cb (GObject *source, } g_simple_async_result_complete_in_idle (priv->async_init_res); + g_object_unref (priv->async_init_res); } static void @@ -90,6 +93,7 @@ server_tls_channel_got_all_cb (TpProxy *proxy, { g_simple_async_result_set_from_error (priv->async_init_res, error); g_simple_async_result_complete_in_idle (priv->async_init_res); + g_object_unref (priv->async_init_res); } else { @@ -163,9 +167,9 @@ empathy_server_tls_handler_finalize (GObject *object) EmpathyServerTLSHandlerPriv *priv = GET_PRIV (object); DEBUG ("%p", object); - - if (priv->channel != NULL) - g_object_unref (priv->channel); + + tp_clear_object (&priv->channel); + tp_clear_object (&priv->certificate); G_OBJECT_CLASS (empathy_server_tls_handler_parent_class)->finalize (object); } diff --git a/libempathy/empathy-tls-certificate.c b/libempathy/empathy-tls-certificate.c index 965219064..a9e323cc0 100644 --- a/libempathy/empathy-tls-certificate.c +++ b/libempathy/empathy-tls-certificate.c @@ -109,6 +109,8 @@ tls_certificate_got_all_cb (TpProxy *proxy, g_simple_async_result_set_from_error (priv->async_init_res, error); g_simple_async_result_complete_in_idle (priv->async_init_res); + g_object_unref (priv->async_init_res); + return; } @@ -125,6 +127,7 @@ tls_certificate_got_all_cb (TpProxy *proxy, priv->cert_data->len, priv->cert_type); g_simple_async_result_complete_in_idle (priv->async_init_res); + g_object_unref (priv->async_init_res); } static void @@ -152,6 +155,7 @@ tls_certificate_init_async (GAsyncInitable *initable, g_simple_async_result_complete_in_idle (priv->async_init_res); g_error_free (error); + g_object_unref (priv->async_init_res); return; } |