summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}