Browse Source

remove useless null check before call to free in fclose

Rich Felker 7 năm trước cách đây
mục cha
commit
0fbe53ed3f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/stdio/fclose.c

+ 1 - 1
src/stdio/fclose.c

@@ -24,7 +24,7 @@ int fclose(FILE *f)
 	r = fflush(f);
 	r |= f->close(f);
 
-	if (f->getln_buf) free(f->getln_buf);
+	free(f->getln_buf);
 	if (!perm) free(f);
 	else FUNLOCK(f);