[gnome-software] appstream plugin: Plug a memory leak when refining addons



commit 3b673007542251a6e1a7176235f2c8884ad4e6e5
Author: Kalev Lember <kalevlember gmail com>
Date:   Sun Oct 5 13:50:38 2014 +0200

    appstream plugin: Plug a memory leak when refining addons

 src/plugins/gs-plugin-appstream.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 4214f62..bc37efb 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -355,10 +355,12 @@ gs_plugin_refine_add_addons (GsPlugin *plugin, GsApp *app, AsApp *item)
                if (!ret) {
                        g_warning ("failed to refine addon: %s", error->message);
                        g_error_free (error);
+                       g_object_unref (addon);
                        continue;
                }
 
                gs_app_add_addon (app, addon);
+               g_object_unref (addon);
        }
 }
 /**


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