]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: Fix fd leaks in virpcivpdtest
authorJiri Denemark <jdenemar@redhat.com>
Thu, 10 Feb 2022 10:32:00 +0000 (11:32 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 11 Feb 2022 14:06:19 +0000 (15:06 +0100)
commit6752bfdbc49c35f5a4219ef6d7d09f27d4bf73a8
treec278e8e941a330558ff76b83f694ade715806c9f
parent1c7c759f5b0a8750862d61bc4a0647517a0aacb4
tests: Fix fd leaks in virpcivpdtest

Tests testVirPCIVPDReadVPDBytes and testVirPCIVPDParseFullVPDInvalid
failed to properly close open fildescriptors in some cases. Let's fix it
by switching to VIR_AUTOCLOSE in the whole file.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/virpcivpdtest.c