chiark / gitweb /
sd-journal: fix bad memory access
[elogind.git] / src / journal / sd-journal.c
index 88b382f4cccf09feb629c3d7b3fec5eb90426b43..99ac1fd4ef384355bf42e4616efe270428db814e 100644 (file)
@@ -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;
 }