Explorar el Código

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

Liu Haoyi hace 2 años
padre
commit
efc3ced31d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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;
 }