summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qedi/qedi_iscsi.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2017-02-07 15:52:58 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2017-02-10 00:35:00 +0100
commit8b9b22ba75907dcced88c815a5427ec0b4298aec (patch)
tree99ca65a7fba28e19c42c8360ab7e475e48dce728 /drivers/scsi/qedi/qedi_iscsi.c
parentscsi: ufs: dump hw regs on link failures (diff)
downloadlinux-8b9b22ba75907dcced88c815a5427ec0b4298aec.tar.xz
linux-8b9b22ba75907dcced88c815a5427ec0b4298aec.zip
scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn()
'conn_info' is malloced in qedi_iscsi_update_conn() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r--drivers/scsi/qedi/qedi_iscsi.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c
index 8b25f0a1eb8c..b9f79d36142d 100644
--- a/drivers/scsi/qedi/qedi_iscsi.c
+++ b/drivers/scsi/qedi/qedi_iscsi.c
@@ -454,13 +454,9 @@ static int qedi_iscsi_update_conn(struct qedi_ctx *qedi,
if (rval) {
rval = -ENXIO;
QEDI_ERR(&qedi->dbg_ctx, "Could not update connection\n");
- goto update_conn_err;
}
kfree(conn_info);
- rval = 0;
-
-update_conn_err:
return rval;
}