diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2013-10-07 10:10:55 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-07 18:59:55 -0700 |
commit | 5f8c609eb0ad5430d99ca59ac503ef457fb9a248 (patch) | |
tree | 3b80bc32674910242923a8812d70abcc1912b350 /drivers/staging | |
parent | 95a7a86ad85e14ca3364a6007be280f3a6f8a7a6 (diff) |
staging: r8188eu: Fix skb leak in usb_read_port_complete()
In the completion routine for a usb_fill_bulk_urb() call, an skb is
leaked whenever the status of the USB transaction is not zero. A call
to skb_put() is needed to fix the problem.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8188eu/hal/usb_ops_linux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c index 2a20f2348108..787763ef74c6 100644 --- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c @@ -547,6 +547,8 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_read_port_complete : purb->status(%d) != 0\n", purb->status)); DBG_88E("###=> usb_read_port_complete => urb status(%d)\n", purb->status); + skb_put(precvbuf->pskb, purb->actual_length); + precvbuf->pskb = NULL; if (rtw_inc_and_chk_continual_urb_error(adapter_to_dvobj(adapt))) adapt->bSurpriseRemoved = true; |