USB: wusbcore/wa-xfer: error handling fixes in setup_segs()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 1 Feb 2013 12:53:34 +0000 (15:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Feb 2013 19:38:14 +0000 (11:38 -0800)
commitf07af4b630d52fb911574031ed7feb9252e65f24
treee7ca5961f68f949bef0dbaa2d3339dc04cba672b
parent4d2079c190558dfa9b766a90a34cb30b8d49c8eb
USB: wusbcore/wa-xfer: error handling fixes in setup_segs()

1) It didn't free xfer->seg[0] so there was a leak.
2) xfer->seg[cnt] can be NULL.
3) Use usb_free_urb() for ->dto_urb instead of kfree().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/wusbcore/wa-xfer.c