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
[ROCm/ROCR-Runtime commit: 57a1c6f3ff]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
مرجع در شماره جدید
Block a user