drm/amdkfd: fix a potential double free in pqm_create_queue
authorChia-I Wu <olvaffe@gmail.com>
Wed, 8 Mar 2023 00:19:02 +0000 (16:19 -0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Mar 2023 14:30:29 +0000 (10:30 -0400)
commitb2ca5c5d416b4e72d1e9d0293fc720e2d525fd42
tree9c8b3561ed184994263c7be2af89084f3babf77a
parent8eeddc0d4200762063e1c66b9cc63afa7b24ebf0
drm/amdkfd: fix a potential double free in pqm_create_queue

Set *q to NULL on errors, otherwise pqm_create_queue would free it
again.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c