]> git.ipfire.org Git - thirdparty/qemu.git/commit
cryptodev: Fix cryptodev_builtin_cleanup() error API violation
authorMarkus Armbruster <armbru@redhat.com>
Wed, 22 Apr 2020 13:07:06 +0000 (15:07 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 29 Apr 2020 06:01:52 +0000 (08:01 +0200)
commit2a340b67bd0a702e6d2102691cb2cb2177b7e210
tree94d555f7e3b77d2c51030705ae8d3a245e16e194
parentf62514b3def5fb2acbef64d0e053c0c31fa45aff
cryptodev: Fix cryptodev_builtin_cleanup() error API violation

The Error ** argument must be NULL, &error_abort, &error_fatal, or a
pointer to a variable containing NULL.  Passing an argument of the
latter kind twice without clearing it in between is wrong: if the
first call sets an error, it no longer points to NULL for the second
call.

cryptodev_builtin_cleanup() passes @errp to
cryptodev_builtin_sym_close_session() in a loop.  Harmless, because
cryptodev_builtin_sym_close_session() can't actually fail.  Fix it
anyway.

Cc: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200422130719.28225-2-armbru@redhat.com>
backends/cryptodev-builtin.c