summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
diff options
context:
space:
mode:
authorYong Zhao <yong.zhao@amd.com>2017-12-08 23:08:48 -0500
committerOded Gabbay <oded.gabbay@gmail.com>2017-12-08 23:08:48 -0500
commit5108d768408abc80e4e8d99f5b406a73cb04056b (patch)
tree19942f9b6191eaa225292b267415c236b4bf66fb /drivers/gpu/drm/amd/amdkfd/kfd_crat.c
parentd63f0ba27a3ee33211de4ec7f2c4287a03492cb2 (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