[Spice-devel] [spice-gtk v1 2/2] file-xfer: fix file path leak
Victor Toso
victortoso at redhat.com
Thu May 12 20:42:38 UTC 2016
---
src/channel-main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/channel-main.c b/src/channel-main.c
index fb0630e..2e2fe86 100644
--- a/src/channel-main.c
+++ b/src/channel-main.c
@@ -2956,8 +2956,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;
}
--
2.5.5
More information about the Spice-devel
mailing list