summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-journal/test-journal-send.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-02-22 18:03:54 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-02-22 23:38:43 +0100
commiteb9752d2be82d994cd6a17f271be27c4d56423d6 (patch)
tree0e0a9a693344f67b2afeecaa0eb0e62dbb9ff411 /src/libsystemd/sd-journal/test-journal-send.c
parenttest-journal-send: close fd opend by syslog() (diff)
downloadsystemd-eb9752d2be82d994cd6a17f271be27c4d56423d6.tar.xz
systemd-eb9752d2be82d994cd6a17f271be27c4d56423d6.zip
journal-send: close fd on exit when running with valgrind
Fixes an issue reported in #22576.
Diffstat (limited to '')
-rw-r--r--src/libsystemd/sd-journal/test-journal-send.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd/sd-journal/test-journal-send.c b/src/libsystemd/sd-journal/test-journal-send.c
index b6644e65c1..533b8d91e6 100644
--- a/src/libsystemd/sd-journal/test-journal-send.c
+++ b/src/libsystemd/sd-journal/test-journal-send.c
@@ -5,7 +5,9 @@
#include <unistd.h>
#include "sd-journal.h"
+
#include "fileio.h"
+#include "journal-send.h"
#include "macro.h"
#include "memory-util.h"
@@ -103,5 +105,6 @@ int main(int argc, char *argv[]) {
/* Sleep a bit to make it easy for journald to collect metadata. */
sleep(1);
+ close_journal_fd();
return 0;
}