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>
Mon, 13 Mar 2023 21:14:28 +0000 (17:14 -0400)
commit0b255ab74b4e362f01173bee19dd650d3169abb6
treef890befa5cde0f7dc21310a44d8ea352f12f5ed3
parent5922231bd346da717ceee8d14b4361fd595e58ac
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