diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-06-23 09:59:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-23 09:59:24 +0200 |
commit | ef88c81bbe3f3f01ac7a01c648f16a1bab9fb375 (patch) | |
tree | 3e975c97ebdbd487b229f06ebd1a8127295eb9a6 | |
parent | github: Update issue templates to issue forms (diff) | |
parent | core: close watchdog device if watchdog device is unspecified now (diff) | |
download | systemd-ef88c81bbe3f3f01ac7a01c648f16a1bab9fb375.tar.xz systemd-ef88c81bbe3f3f01ac7a01c648f16a1bab9fb375.zip |
Merge pull request #23802 from yuwata/core-watchdog-follow-ups
core: cleanups for watchdog
-rw-r--r-- | src/core/main.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/main.c b/src/core/main.c index 18ba2b063c..7cd13b9e13 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -2118,11 +2118,9 @@ static int initialize_runtime( write_container_id(); } - if (arg_watchdog_device) { - r = watchdog_set_device(arg_watchdog_device); - if (r < 0) - log_warning_errno(r, "Failed to set watchdog device to %s, ignoring: %m", arg_watchdog_device); - } + r = watchdog_set_device(arg_watchdog_device); + if (r < 0) + log_warning_errno(r, "Failed to set watchdog device to %s, ignoring: %m", arg_watchdog_device); } else { _cleanup_free_ char *p = NULL; @@ -3007,7 +3005,6 @@ finish: /* Cleanup watchdog_device strings for valgrind. We need them * in become_shutdown() so normally we cannot free them yet. */ watchdog_free_device(); - arg_watchdog_device = mfree(arg_watchdog_device); reset_arguments(); return retval; } |