Skip to content

Commit ea403fd

Browse files
dinghaoliumartinkpetersen
authored andcommitted
scsi: pm8001: Fix memleak in pm8001_exec_internal_task_abort
When pm8001_tag_alloc() fails, task should be freed just like it is done in the subsequent error paths. Link: https://lore.kernel.org/r/[email protected] Acked-by: Jack Wang <[email protected]> Signed-off-by: Dinghao Liu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 75d46c6 commit ea403fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/scsi/pm8001/pm8001_sas.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ pm8001_exec_internal_task_abort(struct pm8001_hba_info *pm8001_ha,
818818

819819
res = pm8001_tag_alloc(pm8001_ha, &ccb_tag);
820820
if (res)
821-
return res;
821+
goto ex_err;
822822
ccb = &pm8001_ha->ccb_info[ccb_tag];
823823
ccb->device = pm8001_dev;
824824
ccb->ccb_tag = ccb_tag;

0 commit comments

Comments
 (0)