chiark / gitweb /
journald: fix another bad memory access
authorLennart Poettering <lennart@poettering.net>
Wed, 18 Jul 2012 11:28:36 +0000 (13:28 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 18 Jul 2012 11:28:39 +0000 (13:28 +0200)
If we rotate due to header out of date we need the new journal file
object, too.

src/journal/journald.c

index c29d75c..17aac88 100644 (file)
@@ -478,6 +478,10 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, unsigned
                 server_rotate(s);
                 server_vacuum(s);
                 vacuumed = true;
+
+                f = find_journal(s, uid);
+                if (!f)
+                        return;
         }
 
         for (;;) {