summaryrefslogtreecommitdiff
path: root/crypto/shash.c
diff options
context:
space:
mode:
authorHongbo Li <herberthbli@tencent.com>2021-06-04 14:30:35 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2021-06-11 15:03:30 +0800
commitb47ec689af0bbd47698520e0d40c6a0979686077 (patch)
treefbe43a8ca932071ae98d29c9be0802972608c340 /crypto/shash.c
parent509855e1c436a508dec850ec0834dba5c4656ff4 (diff)
downloadlinux-crypto-b47ec689af0bbd47698520e0d40c6a0979686077.tar.gz
linux-crypto-b47ec689af0bbd47698520e0d40c6a0979686077.zip
crypto: sm2 - fix a memory leak in sm2
SM2 module alloc ec->Q in sm2_set_pub_key(), when doing alg test in test_akcipher_one(), it will set public key for every test vector, and don't free ec->Q. This will cause a memory leak. This patch alloc ec->Q in sm2_ec_ctx_init(). Fixes: 5185c5f829fd ("crypto: sm2 - introduce OSCCA SM2 asymmetric cipher algorithm") Signed-off-by: Hongbo Li <herberthbli@tencent.com> Reviewed-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions