]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
dmesg: use xstrdup() in xalloc.h based util
authorKarel Zak <kzak@redhat.com>
Tue, 13 Feb 2018 09:52:57 +0000 (10:52 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 13 Feb 2018 09:52:57 +0000 (10:52 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/dmesg.c

index ad47ac44da3382f4b837025310e26ddad18f9a4a..0e2fad6584e8985c02bfbce07c74487a74091572 100644 (file)
@@ -1016,7 +1016,7 @@ mesg_output:
         */
        if (ctl->force_prefix) {
                if (!line) {
-                       mesg_copy = strdup(rec->mesg);
+                       mesg_copy = xstrdup(rec->mesg);
                        line = strtok(mesg_copy, "\n");
                        mesg_size = strlen(line);
                }