Skip to content

Commit

Permalink
r8188eu: Fix skb leak in usb_read_port_complete()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lwfinger committed Oct 7, 2013
1 parent b49674f commit f4d1258
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hal/usb_ops_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,8 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
}
} else {
RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_read_port_complete : purb->status(%d) != 0\n", purb->status));
skb_put(precvbuf->pskb, purb->actual_length);
precvbuf->pskb = NULL;

DBG_88E("###=> usb_read_port_complete => urb status(%d)\n", purb->status);

Expand Down

0 comments on commit f4d1258

Please sign in to comment.