summaryrefslogtreecommitdiff
path: root/src/shutdownd/shutdownd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shutdownd/shutdownd.c')
-rw-r--r--src/shutdownd/shutdownd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/shutdownd/shutdownd.c b/src/shutdownd/shutdownd.c
index 9dd133613..d426d9833 100644
--- a/src/shutdownd/shutdownd.c
+++ b/src/shutdownd/shutdownd.c
@@ -212,10 +212,8 @@ static int update_schedule_file(struct sd_shutdown_command *c) {
}
t = cescape(c->wall_message);
- if (!t) {
- log_error("Out of memory.");
- return -ENOMEM;
- }
+ if (!t)
+ return log_oom();
r = fopen_temporary("/run/systemd/shutdown/scheduled", &f, &temp_path);
if (r < 0) {