diff options
| author | Richard Hughes <richard@hughsie.com> | 2018-07-10 17:10:02 +0100 |
|---|---|---|
| committer | Alexander Larsson <alexander.larsson@gmail.com> | 2018-07-10 19:26:29 +0200 |
| commit | 07c4df4475ccdd4ad5842fe59a020210efe752ac (patch) | |
| tree | 6eba1d53b46bec385e150ac336bd3c4652e01474 | |
| parent | 50fd8aee2491fb34a1ccdccdcc660900d6af296c (diff) | |
| download | flatpak-07c4df4475ccdd4ad5842fe59a020210efe752ac.tar.gz | |
Fix two tiny memory leaks
| -rw-r--r-- | common/flatpak-dir.c | 3 | ||||
| -rw-r--r-- | common/flatpak-installation.c | 2 |
2 files changed, 3 insertions, 2 deletions
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; |
