diff options
author | Yong Zhao <Yong.Zhao@amd.com> | 2020-02-05 17:13:54 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-02-26 14:20:20 -0500 |
commit | 66f28b9a169855367d6e3ef71001969a8bffb19b (patch) | |
tree | e06f1c5ffe0e15aef66e952514f62dd8fe0a9430 /drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | |
parent | b42902f4af8fecd2781f71ad166e8a807edb1053 (diff) |
drm/amdkfd: Fix a memory leak in queue creation error handling
When the queue creation failed, some resources were not freed. Fix it.
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c index cfd3aa1e30e3..3ebbc06f56ee 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c @@ -329,6 +329,9 @@ int pqm_create_queue(struct process_queue_manager *pqm, return retval; err_create_queue: + uninit_queue(q); + if (kq) + kernel_queue_uninit(kq, false); kfree(pqn); err_allocate_pqn: /* check if queues list is empty unregister process from device */ |