diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-04-29 15:07:33 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-04-29 15:07:33 +0100 |
commit | 648db19685b7030aa558a4ddbd3a8e53d8c9a062 (patch) | |
tree | 8e377b98cfb22b5de93054fedf3333c3cab3522e /backends/cryptodev-builtin.c | |
parent | a7922a3c81f34f45b1ebc9670a7769edc4c42a43 (diff) | |
parent | 8ef3a4be27efccd791d05e74b7b17d918f511a76 (diff) |
Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2020-04-29' into staging
Miscellaneous patches for 2020-04-29
# gpg: Signature made Wed 29 Apr 2020 07:42:52 BST
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-misc-2020-04-29: (32 commits)
qemu-option: pass NULL rather than 0 to the id of qemu_opts_set()
libqos: Give get_machine_allocator() internal linkage
fuzz: Simplify how we compute available machines and types
Makefile: Drop unused, broken target recurse-fuzz
smbus: Fix spd_data_generate() for number of banks > 2
bamboo, sam460ex: Tidy up error message for unsupported RAM size
smbus: Fix spd_data_generate() error API violation
sam460ex: Suppress useless warning on -m 32 and -m 64
qga: Fix qmp_guest_suspend_{disk, ram}() error handling
qga: Fix qmp_guest_get_memory_blocks() error handling
tests/test-logging: Fix test for -dfilter 0..0xffffffffffffffff
migration/colo: Fix qmp_xen_colo_do_checkpoint() error handling
io: Fix qio_channel_socket_close() error handling
xen/pt: Fix flawed conversion to realize()
virtio-net: Fix duplex=... and speed=... error handling
bochs-display: Fix vgamem=SIZE error handling
fdc: Fix fallback=auto error handling
arm/virt: Fix virt_machine_device_plug_cb() error API violation
cpus: Proper range-checking for -icount shift=N
cpus: Fix configure_icount() error API violation
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'backends/cryptodev-builtin.c')
-rw-r--r-- | backends/cryptodev-builtin.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/backends/cryptodev-builtin.c b/backends/cryptodev-builtin.c index c8ae3b9742..14316333fe 100644 --- a/backends/cryptodev-builtin.c +++ b/backends/cryptodev-builtin.c @@ -282,12 +282,7 @@ static int cryptodev_builtin_sym_close_session( CryptoDevBackendBuiltin *builtin = CRYPTODEV_BACKEND_BUILTIN(backend); - if (session_id >= MAX_NUM_SESSIONS || - builtin->sessions[session_id] == NULL) { - error_setg(errp, "Cannot find a valid session id: %" PRIu64 "", - session_id); - return -1; - } + assert(session_id < MAX_NUM_SESSIONS && builtin->sessions[session_id]); qcrypto_cipher_free(builtin->sessions[session_id]->cipher); g_free(builtin->sessions[session_id]); @@ -356,8 +351,7 @@ static void cryptodev_builtin_cleanup( for (i = 0; i < MAX_NUM_SESSIONS; i++) { if (builtin->sessions[i] != NULL) { - cryptodev_builtin_sym_close_session( - backend, i, 0, errp); + cryptodev_builtin_sym_close_session(backend, i, 0, &error_abort); } } |