Skip to content

Commit 4747baf

Browse files
Haoxiang Limartinkpetersen
authored andcommitted
scsi: be2iscsi: Fix a memory leak in beiscsi_boot_get_sinfo()
If nonemb_cmd->va fails to be allocated, free the allocation previously made by alloc_mcc_wrb(). Fixes: 50a4b82 ("scsi: be2iscsi: Fix to make boot discovery non-blocking") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> Link: https://patch.msgid.link/20251213083643.301240-1-lihaoxiang@isrc.iscas.ac.cn Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 56bd3c0 commit 4747baf

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/scsi/be2iscsi/be_mgmt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,7 @@ unsigned int beiscsi_boot_get_sinfo(struct beiscsi_hba *phba)
10251025
&nonemb_cmd->dma,
10261026
GFP_KERNEL);
10271027
if (!nonemb_cmd->va) {
1028+
free_mcc_wrb(ctrl, tag);
10281029
mutex_unlock(&ctrl->mbox_lock);
10291030
return 0;
10301031
}

0 commit comments

Comments
 (0)