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)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 12 Oct 2021 14:50:01 +0000 (16:50 +0200)
commita93ddddd00860bda05df72cfd5b80be9b3a93023
tree4f6df29e6627a2efa3ae1948dcea6d591844c0a7
parentb5162039b2309b78a9c1feb6cc1355988e02b6c3
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.

(cherry picked from commit 9f6ef467818f902fe5369c8e37a39a3901bdcf4f)
src/libsystemd/sd-event/sd-event.c