summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/device_handler
diff options
context:
space:
mode:
authortang.junhui <tang.junhui@zte.com.cn>2016-09-18 12:05:11 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2016-09-27 02:42:38 +0200
commit086acff2cf8a6a41f533e5da5f51923db5f68df4 (patch)
tree71144fae506129d1ee1c29a3ed08e17346c4a56d /drivers/scsi/device_handler
parentscsi: lpfc: Mark symbols static where possible (diff)
downloadlinux-086acff2cf8a6a41f533e5da5f51923db5f68df4.tar.xz
linux-086acff2cf8a6a41f533e5da5f51923db5f68df4.zip
scsi: scsi_dh_alua: Fix memory leak in alua_rtpg()
buff should be freed before returning with SCSI_DH_RETRY in alua_rtpg(). Signed-off-by: tang.junhui <tang.junhui@zte.com.cn> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/device_handler')
-rw-r--r--drivers/scsi/device_handler/scsi_dh_alua.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 752b5c9d1ab2..241829e59668 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -583,6 +583,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_port_group *pg)
sdev_printk(KERN_ERR, sdev, "%s: rtpg retry\n",
ALUA_DH_NAME);
scsi_print_sense_hdr(sdev, ALUA_DH_NAME, &sense_hdr);
+ kfree(buff);
return err;
}
sdev_printk(KERN_ERR, sdev, "%s: rtpg failed\n",