]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsblk: fix sysfs_devno_to_devname() usage
authorKarel Zak <kzak@redhat.com>
Tue, 19 Jun 2018 14:10:17 +0000 (16:10 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 21 Jun 2018 11:19:28 +0000 (13:19 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsblk.c

index d797f6295e952aac25cd17d75e7894a1829f47d1..ceb9d461c6964f70f7add64d86d6ad628acd2537 100644 (file)
@@ -1549,6 +1549,7 @@ static int process_one_device(char *devname)
                warn(_("%s: failed to get sysfs name"), devname);
                goto leave;
        }
+       name = xstrdup(name);
 
        if (!strncmp(name, "dm-", 3)) {
                /* dm mapping is never a real partition! */