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:
parent
92148fb777
commit
9048a6ccf3
@ -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[]) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user