From c59516acb20635d26d46b7a9360e558ed336520b Mon Sep 17 00:00:00 2001 From: Ke Liu Date: Tue, 28 Mar 2023 10:30:43 +0800 Subject: [PATCH] hyperhold: fix memory leak in soft_crypt_page ohos inclusion category: bugfix issue: #I6QVSD CVE: NA -------------------------------- Only skcipher_request_alloc but no skcipher_request_free. Fix it by use skcipher_request_free. Signed-off-by: Ke Liu Change-Id: If5c70275a95deab9d6e46dde0b7e0af70e1efde9 --- drivers/hyperhold/hp_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hyperhold/hp_device.c b/drivers/hyperhold/hp_device.c index 5b818265c26d..47c5dd390477 100644 --- a/drivers/hyperhold/hp_device.c +++ b/drivers/hyperhold/hp_device.c @@ -120,6 +120,8 @@ int soft_crypt_page(struct crypto_skcipher *ctfm, struct page *dst_page, else BUG(); + skcipher_request_free(req); + if (ret) pr_err("%scrypt failed!\n", op == HP_DEV_ENCRYPT ? "en" : "de"); -- Gitee