[gnome-software/gnome-3-22] steam: Fix a rather large memory leak when parsing an appinfo file
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-22] steam: Fix a rather large memory leak when parsing an appinfo file
- Date: Tue, 7 Mar 2017 16:31:43 +0000 (UTC)
commit 84bd4b018b4a5b841e7249c270e062731eabee1e
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]