]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: don't manually destroy timer when we can't spawn a child
authorLennart Poettering <lennart@poettering.net>
Sat, 9 Sep 2023 10:09:53 +0000 (12:09 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 9 Sep 2023 12:10:54 +0000 (14:10 +0200)
commit894a30ef3f40b3f6c97f221a30e024264ef53cbf
tree5939b79404229e343918535c9bc377168a386f19
parent436cdf0a077e16daa5f1617460613a8a7924ccfd
core: don't manually destroy timer when we can't spawn a child

Let's stop manually destroying the timers when we fail to spawn a child.
We don't do this in any of the similar codepaths in any of the unit
types, only in two specific ones in socket/swap. Destroying the timer is
unnecessary, since this is done anyway in the _set_state() call of each
unit type if not appropriate, and every failure path here runs through
that anyway.

This brings all these similar codepaths into sync.
src/core/socket.c
src/core/swap.c