[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:
Родитель
21b2f0c803
Коммит
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче