summaryrefslogtreecommitdiffstats
path: root/libmount/python
diff options
context:
space:
mode:
authorKarel Zak2013-10-01 17:18:54 +0200
committerKarel Zak2013-10-01 17:18:54 +0200
commit1d4d4b42e612081d7c1a066119361ff1184b3318 (patch)
tree215f27c036fbe36250978bd5295effdfdc34a370 /libmount/python
parentpylibmount: make tab parsers more robust [coverity scan] (diff)
downloadkernel-qcow2-util-linux-1d4d4b42e612081d7c1a066119361ff1184b3318.tar.gz
kernel-qcow2-util-linux-1d4d4b42e612081d7c1a066119361ff1184b3318.tar.xz
kernel-qcow2-util-linux-1d4d4b42e612081d7c1a066119361ff1184b3318.zip
pylibmount: check for mnt_fs_get_tag() return value [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/python')
-rw-r--r--libmount/python/fs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmount/python/fs.c b/libmount/python/fs.c
index 9cf2555e4..0789d3797 100644
--- a/libmount/python/fs.c
+++ b/libmount/python/fs.c
@@ -39,7 +39,8 @@ static PyObject *Fs_get_tag(FsObject *self)
const char *tag = NULL, *val = NULL;
PyObject *result;
- mnt_fs_get_tag(self->fs, &tag, &val);
+ if (mnt_fs_get_tag(self->fs, &tag, &val) != 0)
+ return NULL;
result = Py_BuildValue("(ss)", tag, val);
if (!result)