sd-event: don't destroy inotify data structures from inotify event handler
authorLennart Poettering <lennart@poettering.net>
Mon, 8 Nov 2021 23:11:38 +0000 (00:11 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 13 Jan 2022 09:52:47 +0000 (10:52 +0100)
commitb912f79ab27a77075c7bfa08e26a4d260e0eb74e
tree18cac068e18acd31f5ff4d1208bd4b9fcbc07878
parent07ab1a3fcc7b29a851e083dd657af7f94de78a9e
sd-event: don't destroy inotify data structures from inotify event handler

This fixes a bad memory access when we destroy an inotify source handler
from the handler itself, and thus destroy the associated inotify_data
structures.

Fixes: #20177
(cherry picked from commit 53baf2efa420cab6c4b1904c9a0c46a0c4ec80a1)
(cherry picked from commit 439a271943aa182002e5fb64f1a216415e556472)
src/libsystemd/sd-event/event-source.h
src/libsystemd/sd-event/sd-event.c