diff options
author | Evegeny Vereshchagin <evvers@ya.ru> | 2018-03-05 23:05:46 +0100 |
---|---|---|
committer | Evegeny Vereshchagin <evvers@ya.ru> | 2018-03-05 23:17:23 +0100 |
commit | 9a92e25545210a5f4eddacbf52a3eeeadb062313 (patch) | |
tree | 9b025711590d7a4f6e1156774434dbec3c32429f /coccinelle/safe_close.cocci | |
parent | tests: stop using `freopen` in `test-fileio` (diff) | |
download | systemd-9a92e25545210a5f4eddacbf52a3eeeadb062313.tar.xz systemd-9a92e25545210a5f4eddacbf52a3eeeadb062313.zip |
tests: close a leftover file descriptor in `test-fileio`
This should make it a bit easier to search for real file descriptor leaks.
```
$ valgrind --leak-check=full --track-fds=yes ./build/test-fileio
...
==29457==
==29457== FILE DESCRIPTORS: 4 open at exit.
==29457== Open file descriptor 3: /tmp/test-systemd_writing_tmpfile.lyV5Rc
==29457== at 0x4B9AD9E: open (open.c:43)
==29457== by 0x4B19B24: __gen_tempname (tempname.c:261)
==29457== by 0x4BA5CC3: mkostemp64 (mkostemp64.c:32)
==29457== by 0x48F739B: mkostemp_safe (fileio.c:1206)
==29457== by 0x10D968: test_writing_tmpfile (test-fileio.c:620)
==29457== by 0x10E930: main (test-fileio.c:767)
==29457==
```
Diffstat (limited to 'coccinelle/safe_close.cocci')
0 files changed, 0 insertions, 0 deletions