diff options
Diffstat (limited to 'bitmap.c')
-rw-r--r-- | bitmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -125,7 +125,10 @@ bitmap_info_t *bitmap_fd_read(int fd, int brief) void *buf; int n, skip; - posix_memalign(&buf, 512, 8192); + if (posix_memalign(&buf, 512, 8192) != 0) { + fprintf(stderr, Name ": failed to allocate 8192 bytes\n"); + return NULL; + } n = read(fd, buf, 8192); info = malloc(sizeof(*info)); |