Fix two tiny memory leaks

This commit is contained in:
Richard Hughes
2018-07-10 17:10:02 +01:00
committed by Alexander Larsson
parent 50fd8aee24
commit 07c4df4475
2 changed files with 3 additions and 2 deletions

View File

@@ -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)

View File

@@ -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;