aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
authorChris Coulson <chris.coulson@canonical.com>2013-01-22 16:25:12 +0000
committerChris Coulson <chris.coulson@canonical.com>2013-01-22 16:25:12 +0000
commitc239517384b8133dd31d2113773cdf3643fce73c (patch)
treeccb0f3dde8be86021f7e1b5490716c6301870fe0 /libdbusmenu-glib
parent3c16f805f46f267bb6afd1a9aa9d595537671150 (diff)
downloadlibdbusmenu-c239517384b8133dd31d2113773cdf3643fce73c.tar.gz
libdbusmenu-c239517384b8133dd31d2113773cdf3643fce73c.tar.bz2
libdbusmenu-c239517384b8133dd31d2113773cdf3643fce73c.zip
Make sure we unref the GDBusMethodInvocation when not sending a reply
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/server.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index 1536e3c..757286e 100644
--- a/libdbusmenu-glib/server.c
+++ b/libdbusmenu-glib/server.c
@@ -1705,6 +1705,8 @@ bus_event (DbusmenuServer * server, GVariant * params, GDBusMethodInvocation * i
} else {
if (~g_dbus_message_get_flags (g_dbus_method_invocation_get_message (invocation)) & G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED) {
g_dbus_method_invocation_return_value(invocation, NULL);
+ } else {
+ g_object_unref(invocation);
}
}
@@ -1755,6 +1757,8 @@ bus_event_group (DbusmenuServer * server, GVariant * params, GDBusMethodInvocati
if (gotone) {
if (~g_dbus_message_get_flags (g_dbus_method_invocation_get_message (invocation)) & G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED) {
g_dbus_method_invocation_return_value(invocation, g_variant_new_tuple(&errors, 1));
+ } else {
+ g_object_unref(invocation);
}
} else {
gchar * ids = g_variant_print(errors, FALSE);
@@ -1867,6 +1871,8 @@ bus_about_to_show_group (DbusmenuServer * server, GVariant * params, GDBusMethod
g_variant_builder_add_value(&tuple, errors);
g_dbus_method_invocation_return_value(invocation, g_variant_builder_end(&tuple));
+ } else {
+ g_object_unref(invocation);
}
} else {
gchar * ids = g_variant_print(errors, FALSE);