[gvfs/nfs] Prevent a double-free when the remote server forces a disconnect
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/nfs] Prevent a double-free when the remote server forces a disconnect
- Date: Mon, 24 Nov 2014 23:31:06 +0000 (UTC)
commit 944003062870346a13e5a1669af87f27ae1ae888
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Mon Nov 24 23:30:54 2014 +0000
Prevent a double-free when the remote server forces a disconnect
daemon/gvfsbackendnfs.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfsbackendnfs.c b/daemon/gvfsbackendnfs.c
index 46012f0..a823191 100644
--- a/daemon/gvfsbackendnfs.c
+++ b/daemon/gvfsbackendnfs.c
@@ -155,6 +155,7 @@ nfs_source_prepare (GSource *source, gint *timeout)
{
g_vfs_backend_force_unmount (G_VFS_BACKEND (nfs_source->backend));
nfs_destroy_context (nfs_source->ctx);
+ nfs_source->backend->ctx = NULL;
g_source_destroy (source);
g_source_unref (source);
}
@@ -193,6 +194,7 @@ nfs_source_dispatch (GSource *source, GSourceFunc callback, gpointer user_data)
err, nfs_get_error (nfs_source->ctx));
g_vfs_backend_force_unmount (G_VFS_BACKEND (nfs_source->backend));
nfs_destroy_context (nfs_source->ctx);
+ nfs_source->backend->ctx = NULL;
g_source_destroy (source);
g_source_unref (source);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]