crypto: dh - fix memory leak
PATCH 1/1 crypto: dh - fix memory leak
In case memory resources for *base* were allocated, release them before return.
Addresses-Coverity-ID: 1471702 ("Resource leak")
Fixes e3fe0ae12962 ("crypto: dh - add public key verification test")
Signed-off-by Gustavo A. R. Silva <[email protected]>
--- crypto/dh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/dh.c +1 -1
@@ -174,7 +174,7 @@ static int dh_compute_value(struct kpp_request *req) } ret =dh_is_pubkey_valid (ctx, base);if (ret) - goto err_free_val; + goto err_free_base; }else { base = ctx->g; }
Signature · 1 line
2.7.4
Am Dienstag, 10. Juli 2018, 16:22:52 CEST schrieb Gustavo A. R. Silva:
Hi Gustavo,
Quoted 2 lines
In case memory resources for *base* were allocated, release them before return.
Thanks a lot.
Reviewed-by Stephan Müller <[email protected]>
Ciao
Stephan
Hi Stephan,
Quoted 9 lines · Stephan Müller
Am Dienstag, 10. Juli 2018, 16:22:52 CEST schrieb Gustavo A. R. Silva:
Hi Gustavo,
Quoted 2 lines
In case memory resources for *base* were allocated, release them before return.
Thanks a lot.
Glad to help. :)
Quoted 2 lines
Reviewed-by Stephan Müller <[email protected]>
Thanks
--
Gustavo
Herbert Xu
maintainerQuoted 6 lines · Gustavo A. R. Silva
In case memory resources for *base* were allocated, release them before return.
Addresses-Coverity-ID: 1471702 ("Resource leak")
Fixes e3fe0ae12962 ("crypto: dh - add public key verification test")Signed-off-by Gustavo A. R. Silva <[email protected]>
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt