From: Karel Zak Date: Wed, 16 Jun 2010 21:40:46 +0000 (+0200) Subject: wipefs: fix mem usage X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9683e327eda75bf7f47e9d058cea9ff9445d58e4;p=util-linux wipefs: fix mem usage Signed-off-by: Karel Zak --- diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c index aa4b696f..1db72fd1 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;