mirror of
https://github.com/systemd/systemd.git
synced 2025-01-12 13:18:14 +03:00
shared/daemon-util: fix notify_on_cleanup()
p itself is never null. Because of this, we would always call sd_notify() in cleanup, even though the intention was to only call it if notify_start() was executed.
This commit is contained in:
parent
e9f4a596a2
commit
297fc20dc4
@ -17,6 +17,6 @@ static inline const char *notify_start(const char *start, const char *stop) {
|
||||
|
||||
/* This is intended to be used with _cleanup_ attribute. */
|
||||
static inline void notify_on_cleanup(const char **p) {
|
||||
if (p)
|
||||
if (*p)
|
||||
(void) sd_notify(false, *p);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user