chiark / gitweb /
journald: fix bad memory access
authorLennart Poettering <lennart@poettering.net>
Wed, 18 Jul 2012 11:10:09 +0000 (13:10 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 18 Jul 2012 11:13:15 +0000 (13:13 +0200)
After vacuuming we need to retrieve the journal file object again, since
it might have changed.

src/journal/journald.c

index d8cfa66..c29d75c 100644 (file)
@@ -513,6 +513,10 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, unsigned
                 server_vacuum(s);
                 vacuumed = true;
 
+                f = find_journal(s, uid);
+                if (!f)
+                        return;
+
                 log_info("Retrying write.");
         }
 }