Commit 72553fe1 authored by Fanhua Li's avatar Fanhua Li Committed by Greg Kroah-Hartman
Browse files

drm/nouveau/nvif: Fix potential memory leak in nvif_vmm_ctor().



[ Upstream commit bb8aeaa3 ]

When the nvif_vmm_type is invalid, we will return error directly
without freeing the args in nvif_vmm_ctor(), which leading a memory
leak. Fix it by setting the ret -EINVAL and goto done.

Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/all/202312040659.4pJpMafN-lkp@intel.com/


Fixes: 6b252cf4 ("drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm")
Signed-off-by: default avatarFanhua Li <lifanhua5@huawei.com>
Link: https://lore.kernel.org/r/20250728115027.50878-1-lifanhua5@huawei.com


Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ad994eda
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment