chiark / gitweb /
journalctl: replace --local by --merge, i.e. don't interleave remote journals by...
[elogind.git] / src / journal / sd-journal.c
index 41526b35bf8e485411095c7ba03ff9c962162f02..0f7c02ce69c9d368d0d4346c1a8e1fd296d8893b 100644 (file)
@@ -1439,15 +1439,13 @@ static sd_journal *journal_new(int flags, const char *path) {
                 return NULL;
         }
 
-        /* One context for each type, plus the zeroth catchall
-         * context. One fd for each file plus one for each type, which
-         * is need when verifying things */
-        j->mmap = mmap_cache_new(_OBJECT_TYPE_MAX, JOURNAL_FILES_MAX + _OBJECT_TYPE_MAX);
+        j->mmap = mmap_cache_new();
         if (!j->mmap) {
                 hashmap_free(j->files);
                 hashmap_free(j->directories_by_path);
                 free(j->path);
                 free(j);
+                return NULL;
         }
 
         return j;