1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-26 14:04:03 +03:00

test-journal-send: close fd opend by syslog()

Fixes an issue reported in #22576.
This commit is contained in:
Yu Watanabe 2022-02-23 01:52:29 +09:00
parent 92148fb777
commit 9048a6ccf3

View File

@ -90,6 +90,10 @@ static void test_journal_send(void) {
assert_se(sd_journal_sendv(graph2, 1) == 0);
assert_se(sd_journal_sendv(message1, 1) == 0);
assert_se(sd_journal_sendv(message2, 1) == 0);
/* The above syslog() opens a fd which is stored in libc, and the valgrind reports the fd is
* leaked when we do not call closelog(). */
closelog();
}
int main(int argc, char *argv[]) {