diff --git a/src/internal/stdio_impl.h b/src/internal/stdio_impl.h index d54c918..65dcfbd 100644 --- a/src/internal/stdio_impl.h +++ b/src/internal/stdio_impl.h @@ -57,7 +57,7 @@ struct __FILE_s { int waiters; void *cookie; off_t off; - void *dummy4; + char *getln_buf; void *mustbezero_2; unsigned char *shend; off_t shlim, shcnt; diff --git a/src/stdio/fclose.c b/src/stdio/fclose.c index 373a2c7..8fdc3f7 100644 --- a/src/stdio/fclose.c +++ b/src/stdio/fclose.c @@ -16,6 +16,7 @@ int fclose(FILE *f) r = fflush(f); r |= f->close(f); + if (f->getln_buf) free(f->getln_buf); if (!perm) free(f); return r;