journald: fix bad memory access

https://bugzilla.redhat.com/show_bug.cgi?id=875653
This commit is contained in:
Lennart Poettering 2012-11-20 00:19:27 +01:00
parent 10f70492ae
commit 7d73c1343b
1 changed files with 1 additions and 1 deletions

View File

@ -336,7 +336,7 @@ void server_rotate(Server *s) {
HASHMAP_FOREACH_KEY(f, k, s->user_journals, i) {
r = journal_file_rotate(&f, s->compress, s->seal);
if (r < 0)
if (f->path)
if (f)
log_error("Failed to rotate %s: %s", f->path, strerror(-r));
else
log_error("Failed to create user journal: %s", strerror(-r));