Skip to contentSkip to conversation

Patch "scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn()" has been added to the 4.10-stable tree

PATCH [email protected] 1 participant 1 message May 9, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn()

to the 4.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
scsi-qedi-fix-possible-memory-leak-in-qedi_iscsi_update_conn.patch
and it can be found in the queue-4.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 8b9b22ba75907dcced88c815a5427ec0b4298aec Mon Sep 17 00:00:00 2001

From: Wei Yongjun <[email protected]>
Date: Tue, 7 Feb 2017 14:52:58 +0000
Subject: scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn()

From: Wei Yongjun <[email protected]>

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.")
---
 drivers/scsi/qedi/qedi_iscsi.c |    4 ----
 1 file changed, 4 deletions(-)
drivers/scsi/qedi/qedi_iscsi.c +0 -4
@@ -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;
 }
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.10/scsi-qedi-fix-possible-memory-leak-in-qedi_iscsi_update_conn.patch queue-4.10/spi-armada-3700-remove-spi_master_put-in-a3700_spi_remove.patch