scsi_debug: fix compare and write errors
authorDouglas Gilbert <dgilbert@interlog.com>
Wed, 26 Nov 2014 17:33:48 +0000 (12:33 -0500)
committerChristoph Hellwig <hch@lst.de>
Mon, 15 Dec 2014 12:34:24 +0000 (13:34 +0100)
Kernel build tools pointed out a memory leak so that has been
fixed and its error paths strengthened with a goto. Testing
showed compare and write was only working for lba=0; correcting
the length of the LBA field fixed that.

Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>

No differences found