[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 02/29] block/crypto: Pacify Coverity after commit f85
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 02/29] block/crypto: Pacify Coverity after commit f853465aacb |
Date: |
Fri, 29 Jun 2018 16:09:32 +0200 |
From: Markus Armbruster <address@hidden>
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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/crypto.c | 4 ++--
1 file 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;
}
--
2.13.6
- [Qemu-block] [PULL 00/29] Block layer patches, Kevin Wolf, 2018/06/29
- [Qemu-block] [PULL 03/29] qapi/job: The next release will be 3.0, Kevin Wolf, 2018/06/29
- [Qemu-block] [PULL 04/29] usb-storage: Add rerror/werror properties, Kevin Wolf, 2018/06/29
- [Qemu-block] [PULL 02/29] block/crypto: Pacify Coverity after commit f853465aacb,
Kevin Wolf <=
- [Qemu-block] [PULL 01/29] block-qdict: Pacify Coverity after commit f1b34a248e9, Kevin Wolf, 2018/06/29
- [Qemu-block] [PULL 05/29] hw/block/nvme: add optional parameter num_queues for nvme device, Kevin Wolf, 2018/06/29
- [Qemu-block] [PULL 08/29] qcow2: Remove coroutine trampoline for preallocate_co(), Kevin Wolf, 2018/06/29
- [Qemu-block] [PULL 06/29] qcow2: Fix qcow2_truncate() error return value, Kevin Wolf, 2018/06/29
- [Qemu-block] [PULL 10/29] block: Use tracked request for truncate, Kevin Wolf, 2018/06/29
- [Qemu-block] [PULL 07/29] block: Convert .bdrv_truncate callback to coroutine_fn, Kevin Wolf, 2018/06/29
- [Qemu-block] [PULL 11/29] file-posix: Make .bdrv_co_truncate asynchronous, Kevin Wolf, 2018/06/29
- [Qemu-block] [PULL 09/29] block: Move bdrv_truncate() implementation to io.c, Kevin Wolf, 2018/06/29
- [Qemu-block] [PULL 13/29] block: Move request tracking to children in copy offloading, Kevin Wolf, 2018/06/29
- [Qemu-block] [PULL 12/29] qcow2: Remove dead check on !ret, Kevin Wolf, 2018/06/29