summaryrefslogtreecommitdiffstats
path: root/libsmartcols
diff options
context:
space:
mode:
authorKarel Zak2017-05-17 12:50:36 +0200
committerKarel Zak2017-05-17 12:50:36 +0200
commit1ce46fcf6bf581b40b5214747142ce69608e4b89 (patch)
treec4688371c697b03abad13a1c01acd7b857580f3d /libsmartcols
parentlibmount: don't pass -1 to close() [coverity scan] (diff)
downloadkernel-qcow2-util-linux-1ce46fcf6bf581b40b5214747142ce69608e4b89.tar.gz
kernel-qcow2-util-linux-1ce46fcf6bf581b40b5214747142ce69608e4b89.tar.xz
kernel-qcow2-util-linux-1ce46fcf6bf581b40b5214747142ce69608e4b89.zip
libsmartcols: check scols_table_set_default_symbols() return code [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols')
-rw-r--r--libsmartcols/src/table_print.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c
index 2377a0063..8cd737c8b 100644
--- a/libsmartcols/src/table_print.c
+++ b/libsmartcols/src/table_print.c
@@ -1375,7 +1375,9 @@ static int initialize_printing(struct libscols_table *tb, struct libscols_buffer
DBG(TAB, ul_debugobj(tb, "initialize printing"));
if (!tb->symbols) {
- scols_table_set_default_symbols(tb);
+ rc = scols_table_set_default_symbols(tb);
+ if (rc)
+ goto err;
tb->priv_symbols = 1;
} else
tb->priv_symbols = 0;