wipefs: fix mem usage

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2010-06-16 23:40:46 +02:00
parent 7d2a8dd00d
commit 9683e327ed
1 changed files with 1 additions and 1 deletions

View File

@ -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;