]> git.ipfire.org Git - thirdparty/qemu.git/commit
cryptodev: Fix error handling in cryptodev_lkcf_execute_task()
authorMarkus Armbruster <armbru@redhat.com>
Wed, 12 Mar 2025 10:11:31 +0000 (11:11 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 19 Mar 2025 06:53:11 +0000 (07:53 +0100)
commit1c89dfefc4c33295126208225f202f39b5a234c3
tree0a707b0576411b766267829691c820db12fd1a31
parent1dae461a913f9da88df05de6e2020d3134356f2e
cryptodev: Fix error handling in cryptodev_lkcf_execute_task()

When cryptodev_lkcf_set_op_desc() fails, we report an error, but
continue anyway.  This is wrong.  We then pass a non-null @local_error
to various functions, which could easily fail error_setv()'s assertion
on failure.

Fail the function instead.

When qcrypto_akcipher_new() fails, we fail the function without
reporting the error.  This leaks the Error object.

Add the missing error reporting.  This also frees the Error object.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20250312101131.1615777-1-armbru@redhat.com>
Reviewed-by: zhenwei pi <pizhenwei@bytedance.com>
backends/cryptodev-lkcf.c