[Spice-commits] src/channel-main.c

Victor Toso de Carvalho victortoso at kemper.freedesktop.org
Fri May 13 11:40:10 UTC 2016


 src/channel-main.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit e41c0ff9084f929fce5af6cfeafb1f6e32622b41
Author: Victor Toso <victortoso at redhat.com>
Date:   Thu May 12 22:36:03 2016 +0200

    file-xfer: fix file path leak
    
    Acked-by: Fabiano FidĂȘncio <fidencio at redhat.com>

diff --git a/src/channel-main.c b/src/channel-main.c
index f7789dd..2905d7b 100644
--- a/src/channel-main.c
+++ b/src/channel-main.c
@@ -2954,8 +2954,10 @@ static void spice_file_transfer_task_completed(SpiceFileTransferTask *self,
     if (self->priv->error)
         g_clear_error(&error);
     if (error) {
+        gchar *path = g_file_get_path(self->priv->file);
         SPICE_DEBUG("File %s xfer failed: %s",
-                    g_file_get_path(self->priv->file), error->message);
+                    path, error->message);
+        g_free(path);
         self->priv->error = error;
     }
 


More information about the Spice-commits mailing list