summaryrefslogtreecommitdiff
path: root/libio/filedoalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/filedoalloc.c')
-rw-r--r--libio/filedoalloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libio/filedoalloc.c b/libio/filedoalloc.c
index 918a24aa14..78aa3d5236 100644
--- a/libio/filedoalloc.c
+++ b/libio/filedoalloc.c
@@ -125,7 +125,9 @@ _IO_file_doallocate (fp)
size = st.st_blksize;
#endif
}
- ALLOC_BUF (p, size, EOF);
+ p = malloc (size);
+ if (__glibc_unlikely (p == NULL))
+ return EOF;
_IO_setb (fp, p, p + size, 1);
return 1;
}