Skip to content

Commit

Permalink
scsi: scsi_dh_alua: Fix memory leak in alua_rtpg()
Browse files Browse the repository at this point in the history
buff should be freed before returning with SCSI_DH_RETRY in alua_rtpg().

Signed-off-by: tang.junhui <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
tang.junhui authored and martinkpetersen committed Sep 27, 2016
1 parent bd4b3e5 commit 086acff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/device_handler/scsi_dh_alua.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 086acff

Please sign in to comment.