Re: [PATCH] cdc-phonet: Don't leak in usbpn_open

2012-08-08 Thread David Miller
From: "Rémi Denis-Courmont" Date: Wed, 8 Aug 2012 10:12:06 +0300 > Le mercredi 8 août 2012 00:56:26 Jesper Juhl, vous avez écrit : >> We allocate memory for 'req' with usb_alloc_urb() and then test >> 'if (!req || rx_submit(pnd, req, GFP_KERNEL | __GFP_COLD))'. >> If we enter that branch due to '

Re: [PATCH] cdc-phonet: Don't leak in usbpn_open

2012-08-08 Thread Rémi Denis-Courmont
Le mercredi 8 août 2012 00:56:26 Jesper Juhl, vous avez écrit : > We allocate memory for 'req' with usb_alloc_urb() and then test > 'if (!req || rx_submit(pnd, req, GFP_KERNEL | __GFP_COLD))'. > If we enter that branch due to '!req' then there is no problem. But if > we enter the branch due to 'req

[PATCH] cdc-phonet: Don't leak in usbpn_open

2012-08-07 Thread Jesper Juhl
We allocate memory for 'req' with usb_alloc_urb() and then test 'if (!req || rx_submit(pnd, req, GFP_KERNEL | __GFP_COLD))'. If we enter that branch due to '!req' then there is no problem. But if we enter the branch due to 'req' being != 0 and the 'rx_submit()' call being false, then we'll leak the