]> git.baikalelectronics.ru Git - kernel.git/commit
USB: WUSBCORE: fix leak of urb in wa_xfer_destroy.
authorThomas Pugliese <thomas.pugliese@gmail.com>
Thu, 15 Aug 2013 19:37:42 +0000 (14:37 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Aug 2013 00:36:27 +0000 (17:36 -0700)
commitc9b555a2cb6df38aaca6479088866f4075edf07b
treefbddbce062055bdc3d02d5d1c8bd9db294c02ead
parentcf082e62177b77f5b857989add9e3e02801b3836
USB: WUSBCORE: fix leak of urb in wa_xfer_destroy.

The check to free the URB was the opposite of the correct case.  This
patch removes the check altogether since the ptr will be NULL if the URB
was not allocated.  Also use usb_free_urb instead of usb_put_urb.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/wusbcore/wa-xfer.c