]> git.ipfire.org Git - thirdparty/systemd.git/commit
logind: drop the seat from the GC queue after draining its devices 42879/head
authorLuca Boccassi <luca.boccassi@gmail.com>
Fri, 3 Jul 2026 18:35:55 +0000 (19:35 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 3 Jul 2026 19:15:34 +0000 (20:15 +0100)
commit166d46eb2ed2d22187c0d87663b9f045ca5bbf35
tree4057a29487462e640b0530a27d908ac142b4ddd7
parenta8b429387a068017696464b2956a19a91222dc31
logind: drop the seat from the GC queue after draining its devices

manager_gc() pops a seat off m->seat_gc_queue and clears
seat->in_gc_queue before calling seat_free(). seat_free() then drains
the seat's devices, and device_detach() calls seat_add_to_gc_queue() for
a seat that just lost its last master device, re-prepending the dying
seat onto m->seat_gc_queue. seat_free() removed itself from the queue up
front, before that drain, so the re-queued seat is left on the queue as a
dangling pointer once mfree() runs.

Follow-up for 718d006a63f773c42106494e823250c48942cf08
src/login/logind-seat.c
src/login/test-login-tables.c