Selaa lähdekoodia

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

Liu Haoyi 2 vuotta sitten
vanhempi
commit
efc3ced31d
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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;
 }