[PATCH v1 1/1] kfd: fixed memleak about release topology

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



memleak will happend that reload module due to ignore kfree when release topology

Signed-off-by: ZhiJie.zhang <botton_zhang@xxxxxxx>
---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 8d50d207cf66..8b86f56bd50c 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -872,6 +872,7 @@ static void kfd_topology_release_sysfs(void)
 		}
 		kobject_del(sys_props.kobj_topology);
 		kobject_put(sys_props.kobj_topology);
+		kfree(sys_props.kobj_topology);
 		sys_props.kobj_topology = NULL;
 	}
 }
-- 
2.34.1




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux