git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
scsi: Fix use-after-free
[pandora-kernel.git]
/
drivers
/
scsi
/
scsi_scan.c
diff --git
a/drivers/scsi/scsi_scan.c
b/drivers/scsi/scsi_scan.c
index
29f5751
..
5d207f1
100644
(file)
--- a/
drivers/scsi/scsi_scan.c
+++ b/
drivers/scsi/scsi_scan.c
@@
-1522,12
+1522,12
@@
static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
out_err:
kfree(lun_data);
out:
- scsi_device_put(sdev);
if (scsi_device_created(sdev))
/*
* the sdev we used didn't appear in the report luns scan
*/
__scsi_remove_device(sdev);
+ scsi_device_put(sdev);
return ret;
}