mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-26 02:45:15 -04:00
Fix a memory leaks
When iterating more than one group, the variable got clobbered. Narrowing their scope helps. This was triggered installing an Inkscape test build Signed-off-by: Hubert Figuière <hub@figuiere.net>
This commit is contained in:
@@ -7551,9 +7551,6 @@ export_desktop_file (const char *app,
|
||||
g_autofree gchar *new_data = NULL;
|
||||
gsize new_data_len;
|
||||
g_autoptr(GKeyFile) keyfile = NULL;
|
||||
g_autofree gchar *old_exec = NULL;
|
||||
gint old_argc;
|
||||
g_auto(GStrv) old_argv = NULL;
|
||||
g_auto(GStrv) groups = NULL;
|
||||
g_autofree char *escaped_app = maybe_quote (app);
|
||||
g_autofree char *escaped_branch = maybe_quote (branch);
|
||||
@@ -7678,6 +7675,9 @@ export_desktop_file (const char *app,
|
||||
|
||||
for (i = 0; groups[i] != NULL; i++)
|
||||
{
|
||||
gint old_argc;
|
||||
g_auto(GStrv) old_argv = NULL;
|
||||
g_autofree gchar *old_exec = NULL;
|
||||
g_autoptr(GString) new_exec = NULL;
|
||||
g_auto(GStrv) flatpak_run_opts = g_key_file_get_string_list (keyfile, groups[i], "X-Flatpak-RunOptions", NULL, NULL);
|
||||
g_autofree char *flatpak_run_args = format_flatpak_run_args_from_run_opts (flatpak_run_opts);
|
||||
|
||||
Reference in New Issue
Block a user