]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blobdiff - src/xdmcp-session.c
Releasing 1.19.4
[sojka/lightdm.git] / src / xdmcp-session.c
index da2a70811580f657699ac06cb28416e4211fc13e..bb78ac6635cb6067f2b0bb44aaf4843ddfc07f26 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -77,15 +77,11 @@ xdmcp_session_init (XDMCPSession *session)
 static void
 xdmcp_session_finalize (GObject *object)
 {
-    XDMCPSession *self;
+    XDMCPSession *self = XDMCP_SESSION (object);
 
-    self = XDMCP_SESSION (object);
-  
     g_free (self->priv->manufacturer_display_id);
-    if (self->priv->address)
-        g_object_unref (self->priv->address);
-    if (self->priv->authority)
-        g_object_unref (self->priv->authority);
+    g_clear_object (&self->priv->address);
+    g_clear_object (&self->priv->authority);
     g_free (self->priv->display_class);
 
     G_OBJECT_CLASS (xdmcp_session_parent_class)->finalize (object);
@@ -96,7 +92,7 @@ xdmcp_session_class_init (XDMCPSessionClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-    object_class->finalize = xdmcp_session_finalize;  
+    object_class->finalize = xdmcp_session_finalize;
 
     g_type_class_add_private (klass, sizeof (XDMCPSessionPrivate));
 }