summaryrefslogtreecommitdiff
path: root/src/shutdownd
diff options
context:
space:
mode:
Diffstat (limited to 'src/shutdownd')
-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 9dd1336133..d426d9833d 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) {