[gnome-settings-daemon] media-keys: More finalize cleanup



commit e37fdb2ae9e281c9fca6ced7b57be50cb556ed07
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Jan 13 01:02:10 2013 +0100

    media-keys: More finalize cleanup

 plugins/media-keys/gsd-media-keys-manager.c |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 2f00365..de29dae 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -2261,20 +2261,11 @@ gsd_media_keys_manager_stop (GsdMediaKeysManager *manager)
                 manager->priv->gtksettings = NULL;
         }
 
-        if (manager->priv->ca) {
-                ca_context_destroy (manager->priv->ca);
-                manager->priv->ca = NULL;
-        }
+        g_clear_pointer (&manager->priv->ca, ca_context_destroy);
 
 #ifdef HAVE_GUDEV
-        if (priv->streams) {
-                g_hash_table_destroy (priv->streams);
-                priv->streams = NULL;
-        }
-        if (priv->udev_client) {
-                g_object_unref (priv->udev_client);
-                priv->udev_client = NULL;
-        }
+        g_clear_pointer (&priv->streams, g_hash_table_destroy);
+        g_clear_object (&priv->udev_client);
 #endif /* HAVE_GUDEV */
 
         g_clear_object (&priv->logind_proxy);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]