[gnome-software] snap: Use g_clear_pointer to unref snap cache



commit df722cb85306fb70591c51be8d3f37477f08c401
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Jul 13 12:13:52 2017 +1200

    snap: Use g_clear_pointer to unref snap cache

 plugins/snap/gs-plugin-snap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index d331a8c..50e4599 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -313,7 +313,7 @@ gs_plugin_destroy (GsPlugin *plugin)
 {
        GsPluginData *priv = gs_plugin_get_data (plugin);
        g_clear_object (&priv->auth);
-       g_hash_table_unref (priv->store_snaps);
+       g_clear_pointer (&priv->store_snaps, g_hash_table_unref);
 }
 
 gboolean


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