Browse Source

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

Liu Haoyi 2 years ago
parent
commit
efc3ced31d
1 changed files with 1 additions and 1 deletions
  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);
         ret = -1;
     }
-__exit:
     fclose(stream);
+__exit:
     return ret;
 }