]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journald: log about an OOM condition
authorLennart Poettering <lennart@poettering.net>
Thu, 25 Oct 2018 16:35:55 +0000 (18:35 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 25 Oct 2018 19:44:48 +0000 (21:44 +0200)
src/journal/journald-server.c

index 5a84f6aa5b57ba70126d91aa60c5ed404cff0f8e..0387b6e01cd8b1eb9dcee8edadd4ed28762e8310 100644 (file)
@@ -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 */