diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-06-26 10:05:46 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-06-29 14:20:56 +0200 |
commit | e6af90f3fb7b87f18f46f6588fbf3e781d6f4ef6 (patch) | |
tree | 8ba4e22644c284c5fc9b32b973079869914e8b1b /block/crypto.c | |
parent | 17e9aa3f220df64fc288a175dbd62324e92d850c (diff) |
block/crypto: Pacify Coverity after commit f853465aacb
Coverity can't see that qobject_input_visitor_new_flat_confused()
returns non-null when it doesn't set @local_err. Check the return
value instead, like all the other callers do.
Fixes: CID 1393615
Fixes: CID 1393616
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/crypto.c')
-rw-r--r-- | block/crypto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/crypto.c b/block/crypto.c index 82091c5f70..aaa8fb7530 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -160,7 +160,7 @@ block_crypto_open_opts_init(QCryptoBlockFormat format, ret->format = format; v = qobject_input_visitor_new_flat_confused(opts, &local_err); - if (local_err) { + if (!v) { goto out; } @@ -214,7 +214,7 @@ block_crypto_create_opts_init(QCryptoBlockFormat format, ret->format = format; v = qobject_input_visitor_new_flat_confused(opts, &local_err); - if (local_err) { + if (!v) { goto out; } |