[gnome-shell] main: Fix small memory leak in main.c



commit 32df0e80ca5544e40101b5af3a7ca25f29a8e932
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sat Jul 9 17:07:46 2011 -0400

    main: Fix small memory leak in main.c
    
    ==17386== 1,669 (88 direct, 1,581 indirect) bytes in 1 blocks are definitely lost in loss record 4,090 of 4,151
    ==17386==    at 0x4C24AF4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==17386==    by 0x691B099: g_malloc0 (in /usr/lib/libglib-2.0.so.0.2800.8)
    ==17386==    by 0x692006A: g_option_context_new (in /usr/lib/libglib-2.0.so.0.2800.8)
    ==17386==    by 0x5124C57: meta_get_option_context (in /usr/lib/libmutter.so.0.0.0)
    ==17386==    by 0x401D4F: main (in /usr/bin/gnome-shell)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=654269

 src/main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index aafef06..fe72e24 100644
--- a/src/main.c
+++ b/src/main.c
@@ -491,6 +491,8 @@ main (int argc, char **argv)
       exit (1);
     }
 
+  g_option_context_free (ctx);
+
   meta_plugin_type_register (gnome_shell_plugin_get_type ());
 
   /* Prevent meta_init() from causing gtk to load gail and at-bridge */



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