diff options
-rw-r--r-- | src/io/read_file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/io/read_file.c b/src/io/read_file.c index e81a6f7..c344f5b 100644 --- a/src/io/read_file.c +++ b/src/io/read_file.c @@ -73,13 +73,12 @@ struct filebuf *file_to_filebuf(char *fname) { return res; } -stream: { +stream: FILE *stream = fdopen(fd, "rb"); struct filebuf *res = stream_to_filebuf(stream); fclose(stream); return res; } -} void free_filebuf(struct filebuf *fb) { switch (fb->mapping_type) { |