[gnome-software] trivial: Use g_clear_object in Flatpak's gs_plugin_destroy



commit 5cfb92fc282fc674830ffb10e470f76b4a6f19fc
Author: Joaquim Rocha <jrocha endlessm com>
Date:   Tue May 31 13:42:26 2016 +0200

    trivial: Use g_clear_object in Flatpak's gs_plugin_destroy

 src/plugins/gs-plugin-flatpak.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/gs-plugin-flatpak.c b/src/plugins/gs-plugin-flatpak.c
index 1a17893..cfd8eb6 100644
--- a/src/plugins/gs-plugin-flatpak.c
+++ b/src/plugins/gs-plugin-flatpak.c
@@ -56,10 +56,8 @@ void
 gs_plugin_destroy (GsPlugin *plugin)
 {
        GsPluginData *priv = gs_plugin_get_data (plugin);
-       if (priv->installation != NULL)
-               g_object_unref (priv->installation);
-       if (priv->monitor != NULL)
-               g_object_unref (priv->monitor);
+       g_clear_object (&priv->installation);
+       g_clear_object (&priv->monitor);
 }
 
 void


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