]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/journal/journal-vacuum.c
journald: fix fd leak in journal_file_empty
authorGeorge McCollister <george.mccollister@gmail.com>
Wed, 4 Sep 2013 12:12:44 +0000 (07:12 -0500)
committerHarald Hoyer <harald@redhat.com>
Fri, 6 Sep 2013 05:11:25 +0000 (07:11 +0200)
commit489798614cefed16db5f086c3fa9a301f0276fd8
tree55f3cc0bcb1f8406a3b3f32eddda0a4293c26c4f
parent629bfc5a7fbbe4861b5cde857140f623d5de5ec5
journald: fix fd leak in journal_file_empty

Before my previous patch, journal_file_empty wasn't be called with the
correct filename. Now that it's being called with the correct filename
it leaks file descriptors. This patch closes the file descriptors before
returning.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
[Edit harald@redhat.com: make use of _cleanup_close_ instead]
src/journal/journal-vacuum.c