summaryrefslogtreecommitdiff
path: root/daemon/gvfsmonitor.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2011-04-15 13:05:30 +0200
committerAlexander Larsson <alexl@redhat.com>2011-04-15 13:05:30 +0200
commit7460f26f9243e6b1745a448b8dc05b15d12aa86e (patch)
treed2685ee3d982117e780297d8cd5947c3eb345f78 /daemon/gvfsmonitor.c
parent0babec2c24287a8578be488dacb0428998aa5648 (diff)
downloadgvfs-7460f26f9243e6b1745a448b8dc05b15d12aa86e.tar.gz
Don't leak dbus messages
We're missing a lot of dbus_message_unref after sending messages, add them.
Diffstat (limited to 'daemon/gvfsmonitor.c')
-rw-r--r--daemon/gvfsmonitor.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/daemon/gvfsmonitor.c b/daemon/gvfsmonitor.c
index 4b91ecef..8947099f 100644
--- a/daemon/gvfsmonitor.c
+++ b/daemon/gvfsmonitor.c
@@ -184,8 +184,9 @@ vfs_monitor_message_callback (DBusConnection *connection,
derror.name,
derror.message);
dbus_error_free (&derror);
-
+
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
}
else
{
@@ -199,8 +200,9 @@ vfs_monitor_message_callback (DBusConnection *connection,
reply = dbus_message_new_method_return (message);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
}
-
+
return DBUS_HANDLER_RESULT_HANDLED;
}
else if (dbus_message_is_method_call (message,
@@ -216,8 +218,9 @@ vfs_monitor_message_callback (DBusConnection *connection,
derror.name,
derror.message);
dbus_error_free (&derror);
-
+
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
}
else
{
@@ -235,9 +238,10 @@ vfs_monitor_message_callback (DBusConnection *connection,
break;
}
}
-
+
reply = dbus_message_new_method_return (message);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
g_object_unref (monitor);
}