Skip to content

Commit 9391f41

Browse files
elmarcoMichael Tokarev
authored andcommitted
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: fa88b85 ("ui/dbus: filter out pending messages when scanout") Signed-off-by: Marc-André Lureau <[email protected]> Reviewed-by: Akihiko Odaki <[email protected]> Message-ID: <[email protected]> (cherry picked from commit 244d52f) Signed-off-by: Michael Tokarev <[email protected]>
1 parent 6d03242 commit 9391f41

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ui/dbus-listener.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,7 @@ dbus_filter(GDBusConnection *connection,
10011001
serial = g_dbus_message_get_serial(message);
10021002
if (serial <= ddl->out_serial_to_discard) {
10031003
trace_dbus_filter(serial, ddl->out_serial_to_discard);
1004+
g_object_unref(message);
10041005
return NULL;
10051006
}
10061007

0 commit comments

Comments
 (0)