소스 검색

[HUST CSE][examples]Fix undefined behavior 'fclose(NULL)' (#7513)

Liu Haoyi 2 년 전
부모
커밋
efc3ced31d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      examples/utest/testcases/posix/stdio_h/functions/setbuf_tc.c

+ 1 - 1
examples/utest/testcases/posix/stdio_h/functions/setbuf_tc.c

@@ -23,8 +23,8 @@ static int setbuf_entry(void)
         printf("setbuf test:%s\n",test_data);
         printf("setbuf test:%s\n",test_data);
         ret = -1;
         ret = -1;
     }
     }
-__exit:
     fclose(stream);
     fclose(stream);
+__exit:
     return ret;
     return ret;
 }
 }