Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1639777

[PATCH 4.10 090/129] scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn()

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.10 090/129] scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn()
Date 2017-05-11 17:50 +0200
Message-ID <tFYvN-8cz-43@gated-at.bofh.it> (permalink)
References <tFX6F-7p4-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Wei Yongjun <weiyongjun1@huawei.com>

commit 8b9b22ba75907dcced88c815a5427ec0b4298aec upstream.

'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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/scsi/qedi/qedi_iscsi.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/drivers/scsi/qedi/qedi_iscsi.c
+++ b/drivers/scsi/qedi/qedi_iscsi.c
@@ -453,13 +453,9 @@ static int qedi_iscsi_update_conn(struct
 	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;
 }
 

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 4.10 090/129] scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 17:50 +0200

csiph-web