diff options
author | Karel Zak <kzak@redhat.com> | 2016-10-04 16:23:52 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2016-10-04 16:23:52 +0200 |
commit | e12e917bad78378ae3cfffcb12d0a9f7a1c3eedc (patch) | |
tree | eb7a5711e37c19545c511b6c49e043764e00681a | |
parent | 0b27fcc189fc772613ed86b315bc211d7a86bc3b (diff) | |
download | util-linux-e12e917bad78378ae3cfffcb12d0a9f7a1c3eedc.tar.gz |
libblkid: check blkid_parse_tag_string() return code [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
-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 9568451e75..51e5b058db 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 59f0fea2ba..f5fc336665 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; |