summaryrefslogtreecommitdiffstats
path: root/bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'bitmap.c')
-rw-r--r--bitmap.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/bitmap.c b/bitmap.c
index 351f08a0..4144977b 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -138,18 +138,7 @@ bitmap_info_t *bitmap_fd_read(int fd, int brief)
}
n = read(fd, buf, 8192);
- info = malloc(sizeof(*info));
- if (info == NULL) {
-#if __GNUC__ < 3
- pr_err("failed to allocate %d bytes\n",
- (int)sizeof(*info));
-#else
- pr_err("failed to allocate %zd bytes\n",
- sizeof(*info));
-#endif
- free(buf);
- return NULL;
- }
+ info = xmalloc(sizeof(*info));
if (n < sizeof(info->sb)) {
pr_err("failed to read superblock of bitmap "