[gvfs] Fix 'path[12]_out' leak in file_transfer()
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] Fix 'path[12]_out' leak in file_transfer()
- Date: Fri, 10 Apr 2015 08:33:18 +0000 (UTC)
commit d59e6873086ff95deb0953c5558632a19659f79a
Author: Christophe Fergeau <cfergeau redhat com>
Date: Sun Mar 29 17:36:54 2015 +0200
Fix 'path[12]_out' leak in file_transfer()
file_transfer() calls create_proxy_for_file2() passing it 'path1_out'
and 'path2_out' arguments. These return values are newly allocated
strings, so they must be freed when no longer used. This fixes a leak
reported by valgrind.
https://bugzilla.gnome.org/show_bug.cgi?id=747361
client/gdaemonfile.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index 8e50c49..6de410b 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -2995,6 +2995,8 @@ retry:
g_main_context_unref (data.context);
g_main_loop_unref (data.loop);
}
+ g_free (path1);
+ g_free (path2);
if (! res)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]