summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorHongbo Li <herberthbli@tencent.com>2021-06-04 08:30:35 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2021-06-11 09:03:30 +0200
commit5cd259ca5d466f65ffd21e2e2fa00fb648a8c555 (patch)
treef68c657bb63dc0f6bd8617774eee800c82c7c3bd /samples
parentcrypto: hisilicon/sec - modify the SEC request structure (diff)
downloadlinux-5cd259ca5d466f65ffd21e2e2fa00fb648a8c555.tar.xz
linux-5cd259ca5d466f65ffd21e2e2fa00fb648a8c555.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: ea7ecb66440b ("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 'samples')
0 files changed, 0 insertions, 0 deletions