[gnome-builder/gnome-builder-3-24] flatpak: Plug a leak



commit ba131cb3ac108ca1bb26941f96edfa14403ff655
Author: Krzesimir Nowak <krzesimir kinvolk io>
Date:   Fri Mar 24 13:32:42 2017 +0100

    flatpak: Plug a leak
    
    We need to free the result of g_strjoin.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780500

 plugins/flatpak/gbp-flatpak-clone-widget.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-clone-widget.c b/plugins/flatpak/gbp-flatpak-clone-widget.c
index bbf1a67..75119bc 100644
--- a/plugins/flatpak/gbp-flatpak-clone-widget.c
+++ b/plugins/flatpak/gbp-flatpak-clone-widget.c
@@ -312,6 +312,7 @@ gbp_flatpak_clone_widget_worker (GTask        *task,
   g_autofree gchar *build_config_path = NULL;
   g_autofree gchar *manifest_hash = NULL;
   g_autofree gchar *runtime_id = NULL;
+  g_autofree gchar *manifest_file_name = NULL;
   gsize manifest_contents_len;
   GError *error = NULL;
   GType git_callbacks_type;
@@ -418,8 +419,9 @@ gbp_flatpak_clone_widget_worker (GTask        *task,
 
   /* copy manifest into the source directory */
   src = g_file_new_for_path (self->manifest);
+  manifest_file_name = g_strjoin (".", self->id, "json", NULL);
   dst = g_file_get_child (req->project_file,
-                          g_strjoin (".", self->id, "json", NULL));
+                          manifest_file_name);
   if (!g_file_copy (src, dst, G_FILE_COPY_OVERWRITE, NULL,
                     NULL, NULL, &error))
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]