aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Raubitschek <jhr@google.com>2005-10-04 10:21:19 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-04 10:21:19 -0400
commit54dac83c426a1a03bd139c5ac7e938890bd2693e (patch)
treee2bc11da1f3cdb99bbe13d5452928b8470604314
parent2ee73cc2d507df7b28050fba5d08bd33dd34848c (diff)
[libata passthru] fix leak on error
-rw-r--r--drivers/scsi/libata-scsi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 98057563a3cc..75cb685e320b 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -116,8 +116,10 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg)
116 if (args[3]) { 116 if (args[3]) {
117 argsize = SECTOR_SIZE * args[3]; 117 argsize = SECTOR_SIZE * args[3];
118 argbuf = kmalloc(argsize, GFP_KERNEL); 118 argbuf = kmalloc(argsize, GFP_KERNEL);
119 if (argbuf == NULL) 119 if (argbuf == NULL) {
120 return -ENOMEM; 120 rc = -ENOMEM;
121 goto error;
122 }
121 123
122 scsi_cmd[1] = (4 << 1); /* PIO Data-in */ 124 scsi_cmd[1] = (4 << 1); /* PIO Data-in */
123 scsi_cmd[2] = 0x0e; /* no off.line or cc, read from dev, 125 scsi_cmd[2] = 0x0e; /* no off.line or cc, read from dev,