mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
glib-compile-resources: Fix a memory leak of the compiler option
`G_OPTION_ARG_STRING` returns a newly allocated string, not a `const` one. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
d286ea0c57
commit
a09aca68d4
@ -812,7 +812,7 @@ main (int argc, char **argv)
|
||||
char *c_name = NULL;
|
||||
char *c_name_no_underscores;
|
||||
const char *linkage = "extern";
|
||||
const char *compiler = NULL;
|
||||
char *compiler = NULL;
|
||||
CompilerType compiler_type = COMPILER_GCC;
|
||||
GOptionContext *context;
|
||||
GOptionEntry entries[] = {
|
||||
@ -886,6 +886,7 @@ main (int argc, char **argv)
|
||||
linkage = "G_GNUC_INTERNAL";
|
||||
|
||||
compiler_type = get_compiler_id (compiler);
|
||||
g_free (compiler);
|
||||
|
||||
srcfile = argv[1];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user