summaryrefslogtreecommitdiff
path: root/examples/utest/testcases
diff options
context:
space:
mode:
authorZ-Xiaoyuan <[email protected]>2023-04-29 12:34:18 +0800
committerMan, Jianting (Meco) <[email protected]>2023-04-29 00:56:50 -0400
commitf5f5bc96f817f3a26ec00b10688258fef75a1205 (patch)
tree966be79c6eeb1f4f5f26b98a42f51504dc05fd19 /examples/utest/testcases
parent7693c6f5abcfa9104561a029ee56fa6566678ad5 (diff)
[examples]Fixed an issue where fclose was not used after using fopen
Diffstat (limited to 'examples/utest/testcases')
-rw-r--r--examples/utest/testcases/posix/stdio_h/functions/perror_tc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/utest/testcases/posix/stdio_h/functions/perror_tc.c b/examples/utest/testcases/posix/stdio_h/functions/perror_tc.c
index 40f035565c..6c2620fcc4 100644
--- a/examples/utest/testcases/posix/stdio_h/functions/perror_tc.c
+++ b/examples/utest/testcases/posix/stdio_h/functions/perror_tc.c
@@ -8,7 +8,9 @@ static int perror_entry(void)
{
printf("perror test:");
perror("nulltest.txt");
+ return -1;
}
+ fclose(stream);
return 0;
}