[gnome-software] trivial: Fix a memory leak when registering an AppStream ID



commit 99c403eed66a3e0d55e41cc776b17ccfcddf2132
Author: Richard Hughes <richard hughsie com>
Date:   Fri Feb 17 11:18:27 2017 +0000

    trivial: Fix a memory leak when registering an AppStream ID

 src/gs-plugin.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-plugin.c b/src/gs-plugin.c
index 2fa888b..4823a34 100644
--- a/src/gs-plugin.c
+++ b/src/gs-plugin.c
@@ -442,7 +442,7 @@ gs_plugin_set_appstream_id (GsPlugin *plugin, const gchar *appstream_id)
 {
        GsPluginPrivate *priv = gs_plugin_get_instance_private (plugin);
        g_free (priv->appstream_id);
-       appstream_id = g_strdup (appstream_id);
+       priv->appstream_id = g_strdup (appstream_id);
 }
 
 /**


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