Bug Fix: Memory leak for HMAC_SHA_SIGN_VERIFY

Free hmac_sha_sv_ctl before releasing the lock

Bug 4881474

Change-Id: I8272ccb841e2cc156650bbfcecbddbdbc54c7f4a
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292556
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
This commit is contained in:
Khushi
2025-01-29 04:10:47 +00:00
committed by Jon Hunter
parent bbf4752022
commit f148b0cc15

View File

@@ -1882,6 +1882,7 @@ static long tnvvse_crypto_dev_ioctl(struct file *filp,
if (ret) {
pr_err("%s(): Failed to copy_from_user hmac_sha_sv_ctl:%d\n", __func__,
ret);
kfree(hmac_sha_sv_ctl);
goto release_lock;
}