]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: use xstrdup instead of xasprintf(...\"%s\"
authorMasatake YAMATO <yamato@redhat.com>
Tue, 13 Jun 2023 10:21:33 +0000 (19:21 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Tue, 13 Jun 2023 10:21:33 +0000 (19:21 +0900)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
misc-utils/lsfd-file.c

index 3826532ba06f4d84a853ced147f86c13b3284f0d..d9f8acf308622aa8bf31e61c2929855477a9b8ca 100644 (file)
@@ -204,7 +204,7 @@ static bool file_fill_column(struct proc *proc,
                        int assoc = file->association * -1;
                        if (assoc >= N_ASSOCS)
                                return false; /* INTERNAL ERROR */
-                       xasprintf(&str, "%s", assocstr[assoc]);
+                       str = xstrdup(assocstr[assoc]);
                }
                break;
        case COL_INODE: