diff options
Diffstat (limited to 'userland/libc/stdio')
-rw-r--r-- | userland/libc/stdio/fopen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/userland/libc/stdio/fopen.c b/userland/libc/stdio/fopen.c index d31082d..71d14db 100644 --- a/userland/libc/stdio/fopen.c +++ b/userland/libc/stdio/fopen.c @@ -44,7 +44,7 @@ FILE *fopen(const char *pathname, const char *mode) { struct stat s; stat(pathname, &s); - FILE *r = malloc(sizeof(FILE)); + FILE *r = calloc(1, sizeof(FILE)); r->read = read_fd; r->write = write_fd; r->seek = seek_fd; |