Plug a few leaks. Fixes #309178.
2006-01-09 Elijah Newren <newren@gmail.com> Plug a few leaks. Fixes #309178. * src/main.c (main): remove an unneeded g_set_prgname() call, free some strings allocated by the GOptions parsing
This commit is contained in:
parent
e3ff2316fe
commit
9eb56f151c
@ -1,3 +1,10 @@
|
||||
2006-01-09 Elijah Newren <newren@gmail.com>
|
||||
|
||||
Plug a few leaks. Fixes #309178.
|
||||
|
||||
* src/main.c (main): remove an unneeded g_set_prgname() call, free
|
||||
some strings allocated by the GOptions parsing
|
||||
|
||||
2006-01-02 Elijah Newren <newren@gmail.com>
|
||||
|
||||
Patch from Björn Lindqvist to fix a logic error. #322149.
|
||||
|
12
src/main.c
12
src/main.c
@ -330,8 +330,6 @@ main (int argc, char **argv)
|
||||
sigset_t empty_mask;
|
||||
MetaArguments meta_args;
|
||||
|
||||
g_set_prgname (argv[0]);
|
||||
|
||||
if (setlocale (LC_ALL, "") == NULL)
|
||||
meta_warning ("Locale not understood by C library, internationalization will not work\n");
|
||||
|
||||
@ -462,6 +460,16 @@ main (int argc, char **argv)
|
||||
*/
|
||||
if (!meta_args.disable_sm)
|
||||
meta_session_init (meta_args.client_id, meta_args.save_file);
|
||||
|
||||
/* Free memory possibly allocated by the argument parsing which are
|
||||
* no longer needed.
|
||||
*/
|
||||
if (meta_args.save_file)
|
||||
g_free (meta_args.save_file);
|
||||
if (meta_args.display_name)
|
||||
g_free (meta_args.display_name);
|
||||
if (meta_args.client_id)
|
||||
g_free (meta_args.client_id);
|
||||
|
||||
if (!meta_display_open (NULL))
|
||||
meta_exit (META_EXIT_ERROR);
|
||||
|
Loading…
Reference in New Issue
Block a user