]> git.ipfire.org Git - thirdparty/systemd.git/commit
mmap-cache: LIST_REMOVE() *after* w->unused_prev
authorVito Caputo <vcaputo@pengaru.com>
Thu, 25 Nov 2021 15:05:06 +0000 (07:05 -0800)
committerLennart Poettering <lennart@poettering.net>
Thu, 25 Nov 2021 20:39:38 +0000 (21:39 +0100)
commitb82aca89a5b366c4377b3b140e54313e817e8f57
tree3d817618f47d73cc2a4e59c96b867b9e816e4a2d
parentf1da1e7b5f36be35de367fdd6b0f12a46ceaabd0
mmap-cache: LIST_REMOVE() *after* w->unused_prev

The LIST_REMOVE() macro always assigns NULL to w->unused_prev,
meaning every time this window was in last_unused, the remainder
of the unused list was lost to the ether.

Turns out there's been a memory leak in journald after all, this
code has been there since at least 2013...
src/libsystemd/sd-journal/mmap-cache.c