提交 3fd8093b 编写于 作者: G Gustavo A. R. Silva 提交者: Herbert Xu

crypto: dh - fix memory leak

In case memory resources for *base* were allocated, release them
before return.

Addresses-Coverity-ID: 1471702 ("Resource leak")
Fixes: e3fe0ae1 ("crypto: dh - add public key verification test")
Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: NStephan Müller <smueller@chronox.de>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 d6be72ee
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册