[gvfs] client: Don't leak the GCancellable's fd in case of an g_poll error



commit 56bdc116f5a0c0c837657b7e59c28511028a4d86
Author: Christian Kellner <gicmo gnome org>
Date:   Wed May 25 15:13:59 2011 +0200

    client: Don't leak the GCancellable's fd in case of an g_poll error

 client/gvfsdaemondbus.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/client/gvfsdaemondbus.c b/client/gvfsdaemondbus.c
index a7a56df..f32a6f8 100644
--- a/client/gvfsdaemondbus.c
+++ b/client/gvfsdaemondbus.c
@@ -765,6 +765,7 @@ _g_vfs_daemon_call_sync (DBusMessage *message,
 	  if (poll_ret == -1)
 	    {
 	      dbus_pending_call_unref (pending);
+	      g_cancellable_release_fd (cancellable);
 	      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
 			   "Error while getting peer-to-peer dbus connection: %s",
 			   "poll error");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]