[gnome-software] external-appstream: Fix leak when getting a temp file name



commit 26039b95fce39bf5dc2bf82b4d62175cc9a40571
Author: Joaquim Rocha <jrocha endlessm com>
Date:   Wed Sep 13 18:51:30 2017 +0200

    external-appstream: Fix leak when getting a temp file name

 .../gs-plugin-external-appstream.c                 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/external-appstream/gs-plugin-external-appstream.c 
b/plugins/external-appstream/gs-plugin-external-appstream.c
index 55b2ebe..fab725d 100644
--- a/plugins/external-appstream/gs-plugin-external-appstream.c
+++ b/plugins/external-appstream/gs-plugin-external-appstream.c
@@ -109,9 +109,9 @@ gs_plugin_external_appstream_refresh_url (GsPlugin *plugin,
 {
        GOutputStream *outstream = NULL;
        SoupSession *soup_session;
-       const gchar *tmp_file_path = NULL;
        guint status_code;
        gboolean file_written;
+       g_autofree gchar *tmp_file_path = NULL;
        g_autofree gchar *file_name = NULL;
        g_autofree gchar *local_mod_date = NULL;
        g_autofree gchar *target_file_path = NULL;


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