From 1d550fbe355105aeedc0e84df23622e3bce77778 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 29 Aug 2013 23:48:36 +0100 Subject: [PATCH 2/2] ServerConnection: dispose internal objects --- src/idle-server-connection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/idle-server-connection.c b/src/idle-server-connection.c index a921c33..66fe3d0 100644 --- a/src/idle-server-connection.c +++ b/src/idle-server-connection.c @@ -107,10 +107,10 @@ static void idle_server_connection_dispose(GObject *obj) { IdleServerConnection *conn = IDLE_SERVER_CONNECTION(obj); IdleServerConnectionPrivate *priv = IDLE_SERVER_CONNECTION_GET_PRIVATE(conn); - if (priv->socket_client != NULL) { - g_object_unref(priv->socket_client); - priv->socket_client = NULL; - } + g_clear_object (&priv->socket_client); + g_clear_object (&priv->io_stream); + g_clear_object (&priv->tls_manager); + g_clear_object (&priv->read_cancellable); } static void idle_server_connection_finalize(GObject *obj) { -- 1.8.4.rc3