]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsblk: fix dm_name usage
authorKarel Zak <kzak@redhat.com>
Wed, 25 Jul 2012 16:04:10 +0000 (18:04 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 25 Jul 2012 16:04:10 +0000 (18:04 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsblk.c

index b4597286c404f5197eef3bcf4cdbcc740c8a5ffe..d1851ea05009c09155dad2f438f340f4d17ec0e1 100644 (file)
@@ -566,7 +566,7 @@ static void set_tt_data(struct blkdev_cxt *cxt, int col, int id, struct tt_line
        case COL_NAME:
                if (cxt->dm_name) {
                        if (is_parsable(lsblk))
-                               tt_line_set_data(ln, col, cxt->dm_name);
+                               tt_line_set_data(ln, col, xstrdup(cxt->dm_name));
                        else {
                                snprintf(buf, sizeof(buf), "%s (%s)",
                                        cxt->dm_name, cxt->name);