sd-event: take ref on event loop object before dispatching event sources
authorMichal Sekletar <msekleta@redhat.com>
Wed, 8 Sep 2021 13:42:11 +0000 (15:42 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 8 Sep 2021 16:15:57 +0000 (01:15 +0900)
commit9f6ef467818f902fe5369c8e37a39a3901bdcf4f
treed6d736b45ee8b563087216280e1c4d759db4d03f
parent1509274359979079e3e61899ce12fc8b0f0958d9
sd-event: take ref on event loop object before dispatching event sources

Idea is that all public APIs should take reference on objects that get
exposed to user-provided callbacks. We take the reference as a
protection from callbacks dropping it. We used to do this also here in
sd_event_loop(). However, in cleanup portion of f814c871e6 this was
accidentally dropped.
src/libsystemd/sd-event/sd-event.c