Re: [PATCH] iommufd/selftest:fix a resource leak

2024-09-04 Thread Jason Gunthorpe
On Wed, Sep 04, 2024 at 04:08:06AM +0800, Liu Jing wrote: > If the file fails to open, not only return return1 but also close the file > descriptor,otherwise resource > leak will occur Why doesn't FIXURE_TEARDOWN do this? Jason

[PATCH] iommufd/selftest:fix a resource leak

2024-09-03 Thread Liu Jing
If the file fails to open, not only return return1 but also close the file descriptor,otherwise resource leak will occur Signed-off-by: Liu Jing --- .../selftests/iommu/iommufd_fail_nth.c| 143 ++ 1 file changed, 83 insertions(+), 60 deletions(-) diff --git a/tools/test