[gvfs] afp: Fix some memory leaks
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] afp: Fix some memory leaks
- Date: Thu, 14 Aug 2014 17:03:03 +0000 (UTC)
commit 32a1e8d6fc55fa525deb85d8fc93497e8b74e832
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Mon Jun 2 07:19:13 2014 +0100
afp: Fix some memory leaks
https://bugzilla.gnome.org/show_bug.cgi?id=734695
daemon/gvfsafpserver.c | 2 ++
daemon/gvfsbackendafp.c | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfsafpserver.c b/daemon/gvfsafpserver.c
index 928f5fa..2d3d33d 100644
--- a/daemon/gvfsafpserver.c
+++ b/daemon/gvfsafpserver.c
@@ -791,6 +791,7 @@ get_server_info (GVfsAfpServer *server,
REPLY_READ_PASCAL (reply, &version);
afp_version = string_to_afp_version (version);
+ g_free (version);
if (afp_version > priv->info.version)
priv->info.version = afp_version;
}
@@ -1211,6 +1212,7 @@ g_vfs_afp_server_logout_sync (GVfsAfpServer *server,
g_vfs_afp_command_put_byte (comm, 0);
reply = g_vfs_afp_connection_send_command_sync (priv->conn, comm, cancellable, error);
+ g_object_unref (comm);
if (!reply) {
g_vfs_afp_connection_close_sync (priv->conn, cancellable, NULL);
goto done;
diff --git a/daemon/gvfsbackendafp.c b/daemon/gvfsbackendafp.c
index 13bca67..3630c1c 100644
--- a/daemon/gvfsbackendafp.c
+++ b/daemon/gvfsbackendafp.c
@@ -2191,6 +2191,9 @@ g_vfs_backend_afp_finalize (GObject *object)
g_free (afp_backend->user);
+ if (afp_backend->volume_name)
+ g_free (afp_backend->volume_name);
+
if (afp_backend->volume)
g_object_unref (afp_backend->volume);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]