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>
This commit is contained in:
tang.junhui 2016-09-18 18:05:11 +08:00 committed by Martin K. Petersen
parent bd4b3e5c8a
commit 086acff2cf
1 changed files with 1 additions and 0 deletions

View File

@ -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",