소스 검색

[examples]Fixed an issue where fclose was not used after using fopen

Z-Xiaoyuan 2 년 전
부모
커밋
f5f5bc96f8
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      examples/utest/testcases/posix/stdio_h/functions/perror_tc.c

+ 2 - 0
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;
 }