2024-01-26 09:31:41

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH v2] crypto: virtio - Less function calls in __virtio_crypto_akcipher_do_req() after error detection

On Tue, Dec 26, 2023 at 11:12:23AM +0100, Markus Elfring wrote:
> From: Markus Elfring <[email protected]>
> Date: Tue, 26 Dec 2023 11:00:20 +0100
>
> The kfree() function was called in up to two cases by the
> __virtio_crypto_akcipher_do_req() function during error handling
> even if the passed variable contained a null pointer.
> This issue was detected by using the Coccinelle software.
>
> * Adjust jump targets.
>
> * Delete two initialisations which became unnecessary
> with this refactoring.
>
> Signed-off-by: Markus Elfring <[email protected]>
> ---
>
> v2:
> A typo was fixed for the delimiter of a label.
>
> drivers/crypto/virtio/virtio_crypto_akcipher_algs.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt