diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c index aa4b696f6..1db72fd1c 100644 --- a/misc-utils/wipefs.c +++ b/misc-utils/wipefs.c @@ -174,7 +174,7 @@ get_offset_from_probe(struct wipe_desc *wp, blkid_probe pr, int zap) wp->usage = xstrdup(usage); wp->type = xstrdup(type); - wp->magic = xmalloc(wp->len); + wp->magic = xmalloc(len); memcpy(wp->magic, mag, len); wp->len = len;