libhsakmt: Remove potential double free in queue creation

Remove potential double free condition when free_queue() is called
after hsaKmtDestroyQueue() if mapping doorbell fails during queue
creation.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Change-Id: If2aa19c455b30d2940b232dbafb9cc1eaad721a5
This commit is contained in:
Mukul Joshi committed 2022-09-08 11:39:34 -04:00
1 bovenliggende 4951495fca
commit 57a1c6f3ff
1 file changed
-1
-1
Bestand weergeven
@@ -662,7 +662,6 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtCreateQueue(HSAuint32 NodeId,
err = map_doorbell(NodeId, gpu_id, doorbell_mmap_offset);
if (err != HSAKMT_STATUS_SUCCESS) {
hsaKmtDestroyQueue(q->queue_id);
free_queue(q);
return HSAKMT_STATUS_ERROR;
}