remove useless null check before call to free in fclose
authorRich Felker <dalias@aerifal.cx>
Sat, 24 Feb 2018 16:36:00 +0000 (11:36 -0500)
committerRich Felker <dalias@aerifal.cx>
Sat, 24 Feb 2018 16:36:00 +0000 (11:36 -0500)
src/stdio/fclose.c

index d687a8779b64f2d46b8790165c695b9612d3cc0a..c675413dc37e228e5bd8a18dbd772921ed1cdc74 100644 (file)
@@ -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);