summaryrefslogtreecommitdiff
path: root/mkfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'mkfs.c')
-rw-r--r--mkfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mkfs.c b/mkfs.c
index a5802f7d..ecd6fbf8 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -668,12 +668,11 @@ static int add_file_items(struct btrfs_trans_handle *trans,
* do our IO in extent buffers so it can work
* against any raid type
*/
- eb = malloc(sizeof(*eb) + sectorsize);
+ eb = calloc(1, sizeof(*eb) + sectorsize);
if (!eb) {
ret = -ENOMEM;
goto end;
}
- memset(eb, 0, sizeof(*eb) + sectorsize);
again: