KVM: selftests: Explicitly close guest_memfd files in some gmem tests
[linux-2.6-microblaze.git] / tools / testing / selftests / kvm / x86_64 / private_mem_conversions_test.c
index 65ad38b..e0f642d 100644 (file)
@@ -434,6 +434,8 @@ static void test_mem_conversions(enum vm_mem_backing_src_type src_type, uint32_t
 
        r = fallocate(memfd, FALLOC_FL_KEEP_SIZE, 0, memfd_size);
        TEST_ASSERT(!r, __KVM_SYSCALL_ERROR("fallocate()", r));
+
+       close(memfd);
 }
 
 static void usage(const char *cmd)