sd-event: fix memleak when built without assertion
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 25 Oct 2024 18:25:26 +0000 (03:25 +0900)
committerMike Yuan <me@yhndnzj.com>
Sat, 26 Oct 2024 15:21:34 +0000 (17:21 +0200)
commit5dc0668802cd07cdca2dc5bda52cc1e63b57f145
tree11b1b85cccc880a524c70460f335e90e9b0a62fb
parentddeb701b55163c3f5149c636b8ed989abfd5b39b
sd-event: fix memleak when built without assertion

Fixes a bug introduced by baf3fdec27f0b3a1f3d39c7def2a778824cbee51.

This also adds several assertions at the beginning of the function.

Fixes #34899.
src/libsystemd/sd-event/sd-event.c