diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2006-03-22 16:04:38 -0600 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-13 10:13:16 -0500 |
commit | 18c49b8cd69c360735df2cc6eeeb2593c01a81e8 (patch) | |
tree | fff4d47d08c8c0531be02f4f47d574cbbb8fdb0e /drivers/scsi | |
parent | 21b2f0c803adaf00fce1b606c50b49ae8b106773 (diff) | |
download | kernel_samsung_smdk4412-18c49b8cd69c360735df2cc6eeeb2593c01a81e8.zip kernel_samsung_smdk4412-18c49b8cd69c360735df2cc6eeeb2593c01a81e8.tar.gz kernel_samsung_smdk4412-18c49b8cd69c360735df2cc6eeeb2593c01a81e8.tar.bz2 |
[SCSI] fix sg leak when scsi_execute_async fails
Doug found a bug where if scsi_execute_async fails, we are leaking
sg resources. scsi_do_req never failed so we did not have to handle
that case before.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/sg.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index fcf9243..bfa86b3 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -748,6 +748,7 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp, /* * most likely out of mem, but could also be a bad map */ + sg_finish_rem_req(srp); return -ENOMEM; } else return 0; |