selftests/efivarfs: create-read: fix a resource leak
authorzhujun2 <zhujun2@cmss.chinamobile.com>
Wed, 18 Oct 2023 01:59:21 +0000 (18:59 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 18 Oct 2023 20:33:44 +0000 (14:33 -0600)
commit3f6f8a8c5e11a9b384a36df4f40f0c9a653b6975
tree244bc7d2424bf1610c798428a7df75c47e00a8dc
parent11df28854bee7060508999c35afac53a0406fe7f
selftests/efivarfs: create-read: fix a resource leak

The opened file should be closed in main(), otherwise resource
leak will occur that this problem was discovered by code reading

Signed-off-by: zhujun2 <zhujun2@cmss.chinamobile.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/efivarfs/create-read.c