projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0b6b6e
)
[SCSI] fix two leaks in scsi_alloc_sdev failure paths
author
Dave Jones
<davej@redhat.com>
Thu, 9 Mar 2006 15:21:27 +0000
(10:21 -0500)
committer
James Bottomley
<jejb@mulgrave.il.steeleye.com>
Sun, 12 Mar 2006 15:25:40 +0000
(09:25 -0600)
If the scsi_alloc_queue or the slave_alloc calls in scsi_alloc_device fail,
we forget to release the locally allocated sdev on the failure path.
Coverity #609
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_scan.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/scsi/scsi_scan.c
b/drivers/scsi/scsi_scan.c
index be14f9d82fde36418e0c0f3e90a67c7c401f0ea6..5d4ca87af3df740d8cf4c90279922f3ddce746ad 100644
(file)
--- a/
drivers/scsi/scsi_scan.c
+++ b/
drivers/scsi/scsi_scan.c
@@
-251,6
+251,7
@@
static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,
/* release fn is set up in scsi_sysfs_device_initialise, so
* have to free and put manually here */
put_device(&starget->dev);
+ kfree(sdev);
goto out;
}