gvfs r2322 - in trunk: . daemon
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r2322 - in trunk: . daemon
- Date: Fri, 13 Mar 2009 13:09:19 +0000 (UTC)
Author: alexl
Date: Fri Mar 13 13:09:19 2009
New Revision: 2322
URL: http://svn.gnome.org/viewvc/gvfs?rev=2322&view=rev
Log:
2009-03-13 Alexander Larsson <alexl redhat com>
Bug 563418 â gvfs backend leaks monitors
* daemon/gvfsmonitor.c:
(unsubscribe):
(vfs_monitor_message_callback):
Fix crashes when unsubscribing monitors.
Modified:
trunk/ChangeLog
trunk/daemon/gvfsmonitor.c
Modified: trunk/daemon/gvfsmonitor.c
==============================================================================
--- trunk/daemon/gvfsmonitor.c (original)
+++ trunk/daemon/gvfsmonitor.c Fri Mar 13 13:09:19 2009
@@ -150,14 +150,13 @@
unsubscribe (GVfsMonitor *monitor,
Subscriber *subscriber)
{
+ monitor->priv->subscribers = g_list_remove (monitor->priv->subscribers, subscriber);
+
dbus_connection_unref (subscriber->connection);
g_free (subscriber->id);
g_free (subscriber->object_path);
g_free (subscriber);
g_object_unref (monitor);
-
- monitor->priv->subscribers = g_list_remove (monitor->priv->subscribers, subscriber);
-
}
static DBusHandlerResult
@@ -222,6 +221,7 @@
}
else
{
+ g_object_ref (monitor); /* Keep alive during possible last remove */
for (l = monitor->priv->subscribers; l != NULL; l = l->next)
{
subscriber = l->data;
@@ -238,6 +238,8 @@
reply = dbus_message_new_method_return (message);
dbus_connection_send (connection, reply, NULL);
+
+ g_object_unref (monitor);
}
return DBUS_HANDLER_RESULT_HANDLED;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]