X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshutdownd%2Fshutdownd.c;h=d426d9833d79359f7c340d8ea137e620b30d5e57;hp=6eb8ed9bf8ee2af14d91c25613f0cd3bf88acd79;hb=0d0f0c50d3a1d90f03972a6abb82e6413daaa583;hpb=d2e54fae5ca7a0f71b5ac8b356a589ff0a09ea0a diff --git a/src/shutdownd/shutdownd.c b/src/shutdownd/shutdownd.c index 6eb8ed9bf..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) {