]> git.baikalelectronics.ru Git - kernel.git/commit
orinoco_usb: fix memory leak in ezusb_access_ltv() when device disconnected
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Thu, 13 Jun 2013 20:26:11 +0000 (00:26 +0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 14 Jun 2013 17:37:16 +0000 (13:37 -0400)
commitda09905e569974ae904eafecc1e0e36fa14ca666
tree5168bfdfb3a726b41bde8534746f9f5bdc216313
parent7e1a19f7cf3a8b727960aea1a66fecae3d15f67d
orinoco_usb: fix memory leak in ezusb_access_ltv() when device disconnected

If "device is disconnected" check occurs to be true in ezusb_access_ltv(),
it just return -ENODEV. But that means request_context is leaked since
there are no any references to it anymore.
The patch adds a call to ezusb_request_context_put() before return.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/orinoco/orinoco_usb.c