[gnome-software/wip/kalev/gnome-3-22: 48/96] steam: Fix a rather large memory leak when parsing an appinfo file



commit 1619c35696bbf6d7774eeba14e2c6548c312e201
Author: Kalev Lember <klember redhat com>
Date:   Sat Jan 28 16:54:14 2017 +0100

    steam: Fix a rather large memory leak when parsing an appinfo file
    
    I had 541,217 bytes leaked in about a day.

 src/plugins/gs-plugin-steam.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-steam.c b/src/plugins/gs-plugin-steam.c
index c41c32e..df716a8 100644
--- a/src/plugins/gs-plugin-steam.c
+++ b/src/plugins/gs-plugin-steam.c
@@ -130,10 +130,10 @@ gs_plugin_steam_parse_appinfo_file (const gchar *filename, GError **error)
        GPtrArray *apps;
        GHashTable *app = NULL;
        const gchar *tmp;
-       guint8 *data = NULL;
        gsize data_len = 0;
        guint i = 0;
        gboolean debug =  g_getenv ("GS_PLUGIN_STEAM_DEBUG") != NULL;
+       g_autofree guint8 *data = NULL;
 
        /* load file */
        if (!g_file_get_contents (filename, (gchar **) &data, &data_len, error)) {


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