Thanks for reviewing! Here's the revised patch.
--- tools/testing/selftests/bpf/prog_tests/arg_parsing.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/arg_parsing.c b/tools/testing/selftests/bpf/prog_tests/arg_parsing.c index bb143de68875..0f99f06116ea 100644 --- a/tools/testing/selftests/bpf/prog_tests/arg_parsing.c +++ b/tools/testing/selftests/bpf/prog_tests/arg_parsing.c @@ -140,9 +140,11 @@ static void test_parse_test_list_file(void) fprintf(fp, "testA/subtest2\n"); fprintf(fp, "testC_no_eof_newline"); fflush(fp); - - if (!ASSERT_OK(ferror(fp), "prepare tmp")) - goto out_fclose; + if (!ASSERT_OK(ferror(fp), "prepare tmp")) { + fclose(fp); + goto out_remove; + } + fclose(fp);
init_test_filter_set(&set);
@@ -160,8 +162,6 @@ static void test_parse_test_list_file(void)
free_test_filter_set(&set);
-out_fclose: - fclose(fp); out_remove: remove(tmpfile); }