forked from Minki/linux
[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>
This commit is contained in:
parent
21b2f0c803
commit
18c49b8cd6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user