chiark / gitweb /
journal: Leave server_dispatch_message early when Storage is none
[elogind.git] / src / journal / journald-server.c
index 332ba41363e842293bf99b590f31daa87ca78cb2..81de9596664bca69d627067ed95862ae3067720f 100644 (file)
@@ -845,6 +845,11 @@ void server_dispatch_message(
         if (LOG_PRI(priority) > s->max_level_store)
                 return;
 
         if (LOG_PRI(priority) > s->max_level_store)
                 return;
 
+        /* Stop early in case the information will not be stored
+         * in a journal. */
+        if (s->storage == STORAGE_NONE)
+                return;
+
         if (!ucred)
                 goto finish;
 
         if (!ucred)
                 goto finish;