mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
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>
|
2006-01-02 Elijah Newren <newren@gmail.com>
|
||||||
|
|
||||||
Patch from Björn Lindqvist to fix a logic error. #322149.
|
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;
|
sigset_t empty_mask;
|
||||||
MetaArguments meta_args;
|
MetaArguments meta_args;
|
||||||
|
|
||||||
g_set_prgname (argv[0]);
|
|
||||||
|
|
||||||
if (setlocale (LC_ALL, "") == NULL)
|
if (setlocale (LC_ALL, "") == NULL)
|
||||||
meta_warning ("Locale not understood by C library, internationalization will not work\n");
|
meta_warning ("Locale not understood by C library, internationalization will not work\n");
|
||||||
|
|
||||||
@ -463,6 +461,16 @@ main (int argc, char **argv)
|
|||||||
if (!meta_args.disable_sm)
|
if (!meta_args.disable_sm)
|
||||||
meta_session_init (meta_args.client_id, meta_args.save_file);
|
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))
|
if (!meta_display_open (NULL))
|
||||||
meta_exit (META_EXIT_ERROR);
|
meta_exit (META_EXIT_ERROR);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user