summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/journal/journal-vacuum.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c
index ace772273b..178c8030db 100644
--- a/src/journal/journal-vacuum.c
+++ b/src/journal/journal-vacuum.c
@@ -129,8 +129,9 @@ static void patch_realtime(
}
static int journal_file_empty(int dir_fd, const char *name) {
- int fd, r;
+ int r;
le64_t n_entries;
+ _cleanup_close_ int fd;
fd = openat(dir_fd, name, O_RDONLY|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK);
if (fd < 0)