mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 06:26:15 +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;
|
gchar *equal = argv[i] + 8;
|
||||||
|
|
||||||
if (*equal == '=')
|
if (*equal == '=')
|
||||||
marshaller_prefix = g_strdup (equal + 1);
|
marshaller_prefix = equal + 1;
|
||||||
else if (i + 1 < argc)
|
else if (i + 1 < argc)
|
||||||
{
|
{
|
||||||
marshaller_prefix = g_strdup (argv[i + 1]);
|
marshaller_prefix = argv[i + 1];
|
||||||
argv[i] = NULL;
|
argv[i] = NULL;
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user