]> err.no Git - util-linux/commitdiff
wipefs: fix mem usage
authorKarel Zak <kzak@redhat.com>
Wed, 16 Jun 2010 21:40:46 +0000 (23:40 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 16 Jun 2010 21:40:46 +0000 (23:40 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/wipefs.c

index aa4b696f6623cb5ff4d0156d051c5fe50b38eee0..1db72fd1cf06d5a5b20b0fa7fdfbde78602a3909 100644 (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;