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:kernel 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:
Fanhua Li <lifanhua5@huawei.com> Link: https://lore.kernel.org/r/20250728115027.50878-1-lifanhua5@huawei.com Signed-off-by:
Danilo Krummrich <dakr@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading