aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Coulson <chris.coulson@canonical.com>2013-01-22 18:11:36 +0000
committerTarmac <Unknown>2013-01-22 18:11:36 +0000
commitb6565b19137f305773e395465a7b8d43ba3404b8 (patch)
treeccb0f3dde8be86021f7e1b5490716c6301870fe0
parent3c16f805f46f267bb6afd1a9aa9d595537671150 (diff)
parentc239517384b8133dd31d2113773cdf3643fce73c (diff)
downloadlibdbusmenu-b6565b19137f305773e395465a7b8d43ba3404b8.tar.gz
libdbusmenu-b6565b19137f305773e395465a7b8d43ba3404b8.tar.bz2
libdbusmenu-b6565b19137f305773e395465a7b8d43ba3404b8.zip
Fix a memory leak (bug 1103050). Fixes: https://bugs.launchpad.net/bugs/1103050.
Approved by Charles Kerr, PS Jenkins bot.
-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);