From 18bc29612aa14f5ffd2ef9c227decc81b1f1219c Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 8 Dec 2021 11:38:57 +0000 Subject: [PATCH] drm/amd/amdgpu: fix potential memleak From Bernard Zhao c746945fb6bcbe3863c9ea6369c7ef376e38e5eb in linux 5.10.y/5.10.84 27dfaedc0d321b4ea4e10c53e4679d6911ab17aa in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_xgmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_xgmi.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_xgmi.c index 6d8e9514b93..64028a8f671 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_xgmi.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_xgmi.c @@ -373,6 +373,7 @@ struct amdgpu_hive_info *amdgpu_get_xgmi_hive(struct amdgpu_device *adev) "%s", "xgmi_hive_info"); if (ret) { dev_err(adev->dev, "XGMI: failed initializing kobject for xgmi hive\n"); + kobject_put(&hive->kobj); kfree(hive); hive = NULL; goto pro_end; -- 2.20.1