aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2024-10-08 16:50:12 +0400
committerMichael Tokarev <mjt@tls.msk.ru>2024-10-16 11:14:35 +0300
commit9391f419c7ef5e180e42177ea9a662389a69bbbe (patch)
treeba9de163bc7f22efaf76bfb13a4da340249e8d58
parent6d03242a7e47815ed56687ecd13f683d8da3f2fe (diff)
ui/dbus: fix leak on message filtering
A filter function that wants to drop a message should return NULL, in which case it must also unref the message itself. Fixes: fa88b85de ("ui/dbus: filter out pending messages when scanout") Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-ID: <20241008125028.1177932-4-marcandre.lureau@redhat.com> (cherry picked from commit 244d52ff736fefc3dd364ed091720aa896af306d) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r--ui/dbus-listener.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c
index a54123acea..434bd608f2 100644
--- a/ui/dbus-listener.c
+++ b/ui/dbus-listener.c
@@ -1001,6 +1001,7 @@ dbus_filter(GDBusConnection *connection,
serial = g_dbus_message_get_serial(message);
if (serial <= ddl->out_serial_to_discard) {
trace_dbus_filter(serial, ddl->out_serial_to_discard);
+ g_object_unref(message);
return NULL;
}