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: ace7f46ba5
("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>
This commit is contained in:
parent
7942f7b568
commit
8b9b22ba75
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user