From 44a5fa34d9f9a5050cdf4a497e6ccf5af2d1678d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 16 Oct 2012 22:59:28 +0200 Subject: [PATCH] sd-journal: fix bad memory access --- src/journal/sd-journal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 88b382f4cc..99ac1fd4ef 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -1258,11 +1258,13 @@ static int remove_file(sd_journal *j, const char *prefix, const char *filename) return 0; hashmap_remove(j->files, f->path); + + log_debug("File %s got removed.", f->path); + journal_file_close(f); j->current_invalidate_counter ++; - log_debug("File %s got removed.", f->path); return 0; }