diff options
author | Yong Zhao <yong.zhao@amd.com> | 2017-12-08 23:08:48 -0500 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2017-12-08 23:08:48 -0500 |
commit | 5108d768408abc80e4e8d99f5b406a73cb04056b (patch) | |
tree | 19942f9b6191eaa225292b267415c236b4bf66fb /drivers/gpu/drm/amd/amdkfd/kfd_crat.c | |
parent | d63f0ba27a3ee33211de4ec7f2c4287a03492cb2 (diff) |
drm/amdkfd: Fix memory leaks in kfd topology
Kobject created using kobject_create_and_add() can be freed using
kobject_put() when there is no referenece any more. However,
kobject memory allocated with kzalloc() has to set up a release
callback in order to free it when the counter decreases to 0.
Otherwise it causes memory leak.
Signed-off-by: Yong Zhao <yong.zhao@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_crat.c')
0 files changed, 0 insertions, 0 deletions