diff options
author | Karel Zak | 2019-05-28 12:05:03 +0200 |
---|---|---|
committer | Karel Zak | 2019-05-28 12:05:03 +0200 |
commit | a0661407136ec393ebc9b0ae50bb161ee72fc2a7 (patch) | |
tree | 6c188c5f7b0f91c5e450a5742617cd88de639882 /sys-utils | |
parent | lscpu: make lookup() use more consistent [coverity scan] (diff) | |
download | kernel-qcow2-util-linux-a0661407136ec393ebc9b0ae50bb161ee72fc2a7.tar.gz kernel-qcow2-util-linux-a0661407136ec393ebc9b0ae50bb161ee72fc2a7.tar.xz kernel-qcow2-util-linux-a0661407136ec393ebc9b0ae50bb161ee72fc2a7.zip |
lscpu: check scols_line_set_data() return value [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils')
-rw-r--r-- | sys-utils/lscpu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index 48b376458..0e775805e 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -1881,7 +1881,8 @@ static void __attribute__ ((__format__(printf, 3, 4))) err(EXIT_FAILURE, _("failed to allocate output line")); /* description column */ - scols_line_set_data(ln, 0, txt); + if (txt && scols_line_set_data(ln, 0, txt)) + err(EXIT_FAILURE, _("failed to add output data")); /* data column */ va_start(args, fmt); |