mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
glib-genmarshal: Fix memory leak with --prefix
If --prefix is specified, marshaller_prefix is allocated and never freed. It does not actually have to be allocated — just use the static string from argv. Coverity CID: 1325370
This commit is contained in:
parent
292fd1155a
commit
4f6dc30232
@ -993,10 +993,10 @@ parse_args (gint *argc_p,
|
||||
gchar *equal = argv[i] + 8;
|
||||
|
||||
if (*equal == '=')
|
||||
marshaller_prefix = g_strdup (equal + 1);
|
||||
marshaller_prefix = equal + 1;
|
||||
else if (i + 1 < argc)
|
||||
{
|
||||
marshaller_prefix = g_strdup (argv[i + 1]);
|
||||
marshaller_prefix = argv[i + 1];
|
||||
argv[i] = NULL;
|
||||
i += 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user