wipefs: fix mem usage
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
7d2a8dd00d
commit
9683e327ed
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue