Commit b2ca5c5d authored by Chia-I Wu's avatar Chia-I Wu Committed by Alex Deucher
Browse files

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: default avatarChia-I Wu <olvaffe@gmail.com>
Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8eeddc0d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -218,8 +218,8 @@ static int init_user_queue(struct process_queue_manager *pqm,
	return 0;

cleanup:
	if (dev->shared_resources.enable_mes)
	uninit_queue(*q);
	*q = NULL;
	return retval;
}