[gnome-terminal/gnome-3-8] client: legacy: Fix mem leak



commit 6ea790d5338315581cc62a9a418e9dec0baa9076
Author: Christian Persch <chpe gnome org>
Date:   Fri Jul 5 13:43:22 2013 +0200

    client: legacy: Fix mem leak
    
    ==24616== 18 bytes in 1 blocks are definitely lost in loss record 1,572 of 4,602
    ==24616==    at 0x402A059: malloc (vg_replace_malloc.c:263)
    ==24616==    by 0x4F4FD41: g_malloc (gmem.c:104)
    ==24616==    by 0x4F5006D: g_malloc_n (gmem.c:345)
    ==24616==    by 0x4F69E40: g_strdup (gstrfuncs.c:364)
    ==24616==    by 0x4DC2ADC: g_local_file_get_path (glocalfile.c:334)
    ==24616==    by 0x4CEB7A5: g_file_get_path (gfile.c:507)
    ==24616==    by 0x804DEBC: option_load_config_cb (terminal-options.c:583)
    (cherry picked from commit 4f39be35951e4ad6ff73739654387f32329aa7fe)

 src/terminal-options.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/terminal-options.c b/src/terminal-options.c
index eba9dc2..95b33c4 100644
--- a/src/terminal-options.c
+++ b/src/terminal-options.c
@@ -585,10 +585,11 @@ option_load_config_cb (const gchar *option_name,
 
   key_file = g_key_file_new ();
   result = g_key_file_load_from_file (key_file, config_file, 0, error) &&
-           terminal_options_merge_config (options, key_file, 
+           terminal_options_merge_config (options, key_file,
                                           strcmp (option_name, "load-config") == 0 ? SOURCE_DEFAULT : 
SOURCE_SESSION,
                                           error);
   g_key_file_free (key_file);
+  g_free (config_file);
 
   return result;
 }


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