[SCSI] sg: fix leak when dio setup fails
authorDouglas Gilbert <dougg@torque.net>
Tue, 28 Mar 2006 19:48:22 +0000 (14:48 -0500)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Thu, 13 Apr 2006 15:13:27 +0000 (10:13 -0500)
commitc06bb7f514567efa39062a781679120e51caa818
treed58b61ab78469e7d4a94935ad8169c9764b9f54a
parentd6159c17c2c76963a8067d1e1ac3c4c36c05e674
[SCSI] sg: fix leak when dio setup fails

when the sg driver is unable to setup direct IO, free that scatter
gather list prior to falling back to indirect IO

Further to this thread started by Bryan Holty:
http://marc.theaimsgroup.com/?l=linux-scsi&m=114306885116728&w=2

Here is the reworked patch again. This time it has been
tested with a program provided by Bryan.

Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/sg.c