From e296379863424d50b300ca95f3b577a7e8a4ac83 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 15 Jun 2014 17:19:56 +0100 Subject: [PATCH] Fixed memleak when writing preferences file --- src/config/preferences.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config/preferences.c b/src/config/preferences.c index 32473848..6c41cdfa 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -360,8 +360,9 @@ static void _save_prefs(void) { gsize g_data_size; - char *g_prefs_data = g_key_file_to_data(prefs, &g_data_size, NULL); + gchar *g_prefs_data = g_key_file_to_data(prefs, &g_data_size, NULL); g_file_set_contents(prefs_loc, g_prefs_data, g_data_size, NULL); + g_free(g_prefs_data); } static gchar *