]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/amdgpu: fix potential memleak
authorBernard Zhao <bernard@vivo.com>
Mon, 15 Nov 2021 02:58:50 +0000 (18:58 -0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Nov 2021 04:04:57 +0000 (23:04 -0500)
commitcb40f58f958b7cf958bc4ffab6c0c4ef2aa0f189
treeac73aee74c0a269fde3459726cf8b6febefc0489
parentc44152613b499a2dea9412696b9070aeee94e7b9
drm/amd/amdgpu: fix potential memleak

In function amdgpu_get_xgmi_hive, when kobject_init_and_add failed
There is a potential memleak if not call kobject_put.

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Bernard Zhao <bernard@vivo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c