diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index 0e672864..092ba65a 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -5358,12 +5358,13 @@ export_mime_file (int parent_fd, static char * format_flatpak_run_args_from_run_opts (GStrv flatpak_run_args) { - GString *str = g_string_new (""); + GString *str; GStrv iter = flatpak_run_args; if (flatpak_run_args == NULL) return NULL; + str = g_string_new (""); for (; *iter != NULL; ++iter) { if (g_strcmp0 (*iter, "no-a11y-bus") == 0) diff --git a/common/flatpak-installation.c b/common/flatpak-installation.c index f8375492..edc489ba 100644 --- a/common/flatpak-installation.c +++ b/common/flatpak-installation.c @@ -1043,7 +1043,7 @@ flatpak_installation_list_installed_refs_for_update (FlatpakInstallation *self, { FlatpakInstalledRef *installed_ref = g_ptr_array_index (installed, i); const char *remote_name = flatpak_installed_ref_get_origin (installed_ref); - const char *ref = flatpak_ref_format_ref (FLATPAK_REF (installed_ref)); + g_autofree char *ref = flatpak_ref_format_ref (FLATPAK_REF (installed_ref)); g_autofree char *collection_id = NULL; g_autoptr(OstreeCollectionRef) collection_ref = NULL;