From d03077759e972801ec2bfff8af6ac475bb97d5ad Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 25 Oct 2018 18:35:55 +0200 Subject: [PATCH] journald: log about an OOM condition --- src/journal/journald-server.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index 5a84f6aa5b5..0387b6e01cd 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -411,8 +411,10 @@ static JournalFile* find_journal(Server *s, uid_t uid) { } if (asprintf(&p, "/var/log/journal/" SD_ID128_FORMAT_STR "/user-"UID_FMT".journal", - SD_ID128_FORMAT_VAL(machine), uid) < 0) + SD_ID128_FORMAT_VAL(machine), uid) < 0) { + log_oom(); return s->system_journal; + } while (ordered_hashmap_size(s->user_journals) >= USER_JOURNALS_MAX) { /* Too many open? Then let's close one */ -- 2.39.5