]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lscpu: check return code [coverity scan]
authorKarel Zak <kzak@redhat.com>
Fri, 31 Mar 2017 08:58:50 +0000 (10:58 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 31 Mar 2017 08:58:50 +0000 (10:58 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lscpu.c

index a3b4c8b1d73baa64e238373b2e27366049ae3d99..bc449dac58be819b34be7b6b50e8a0e3269a0411 100644 (file)
@@ -1744,7 +1744,8 @@ print_readable(struct lscpu_desc *desc, int cols[], int ncols,
                                             buf, sizeof(buf));
                        if (!data || !*data)
                                data = "-";
-                       scols_line_set_data(line, c, data);
+                       if (scols_line_set_data(line, c, data))
+                               err_oom();
                }
        }