diff options
author | Dinghao Liu <dinghao.liu@zju.edu.cn> | 2020-08-23 11:14:53 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-09-01 03:21:01 +0200 |
commit | ea403fde7552bd61bad6ea45e3feb99db77cb31e (patch) | |
tree | c2456d454ae37745db1157edd78e9317666ac049 | |
parent | scsi: scsi_debug: Remove superfluous close zone in resp_open_zone() (diff) | |
download | linux-ea403fde7552bd61bad6ea45e3feb99db77cb31e.tar.xz linux-ea403fde7552bd61bad6ea45e3feb99db77cb31e.zip |
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/20200823091453.4782-1-dinghao.liu@zju.edu.cn
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/pm8001/pm8001_sas.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index 337e79d6837f..9889bab7d31c 100644 --- a/drivers/scsi/pm8001/pm8001_sas.c +++ b/drivers/scsi/pm8001/pm8001_sas.c @@ -818,7 +818,7 @@ pm8001_exec_internal_task_abort(struct pm8001_hba_info *pm8001_ha, res = pm8001_tag_alloc(pm8001_ha, &ccb_tag); if (res) - return res; + goto ex_err; ccb = &pm8001_ha->ccb_info[ccb_tag]; ccb->device = pm8001_dev; ccb->ccb_tag = ccb_tag; |