mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
crypto: inside-secure - free requests even if their handling failed
This patch frees the request private data even if its handling failed,
as it would never be freed otherwise.
Fixes: 1b44c5a60c
("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver")
Suggested-by: Ofer Heifetz <oferh@marvell.com>
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
1eb7b40386
commit
0a02dcca12
1 changed files with 1 additions and 0 deletions
|
@ -607,6 +607,7 @@ static inline void safexcel_handle_result_descriptor(struct safexcel_crypto_priv
|
|||
ndesc = ctx->handle_result(priv, ring, sreq->req,
|
||||
&should_complete, &ret);
|
||||
if (ndesc < 0) {
|
||||
kfree(sreq);
|
||||
dev_err(priv->dev, "failed to handle result (%d)", ndesc);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue