diff options
author | Karel Zak | 2016-10-04 16:23:52 +0200 |
---|---|---|
committer | Karel Zak | 2016-10-04 16:23:52 +0200 |
commit | e12e917bad78378ae3cfffcb12d0a9f7a1c3eedc (patch) | |
tree | eb7a5711e37c19545c511b6c49e043764e00681a /libblkid/src | |
parent | lib/randutils: remove unnecessary function (diff) | |
download | kernel-qcow2-util-linux-e12e917bad78378ae3cfffcb12d0a9f7a1c3eedc.tar.gz kernel-qcow2-util-linux-e12e917bad78378ae3cfffcb12d0a9f7a1c3eedc.tar.xz kernel-qcow2-util-linux-e12e917bad78378ae3cfffcb12d0a9f7a1c3eedc.zip |
libblkid: check blkid_parse_tag_string() return code [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src')
-rw-r--r-- | libblkid/src/evaluate.c | 3 | ||||
-rw-r--r-- | libblkid/src/resolve.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/libblkid/src/evaluate.c b/libblkid/src/evaluate.c index 9568451e7..51e5b058d 100644 --- a/libblkid/src/evaluate.c +++ b/libblkid/src/evaluate.c @@ -240,8 +240,7 @@ char *blkid_evaluate_tag(const char *token, const char *value, blkid_cache *cach ret = strdup(token); goto out; } - blkid_parse_tag_string(token, &t, &v); - if (!t || !v) + if (blkid_parse_tag_string(token, &t, &v) != 0 || !t || !v) goto out; token = t; value = v; diff --git a/libblkid/src/resolve.c b/libblkid/src/resolve.c index 59f0fea2b..f5fc33666 100644 --- a/libblkid/src/resolve.c +++ b/libblkid/src/resolve.c @@ -76,8 +76,7 @@ char *blkid_get_devname(blkid_cache cache, const char *token, ret = strdup(token); goto out; } - blkid_parse_tag_string(token, &t, &v); - if (!t || !v) + if (blkid_parse_tag_string(token, &t, &v) != 0 || !t || !v) goto out; token = t; value = v; |