Re: [PATCH] media, tlg2300: Fix memory leak in alloc_bulk_urbs_generic()

2011-01-03 Thread Huang Shijie
Hi Jesper: Thanks for your patch. 2011/1/3 Jesper Juhl j...@chaosbits.net: Hi, While reading drivers/media/video/tlg2300/pd-video.c::alloc_bulk_urbs_generic() I noticed that  - We don't free the memory allocated to 'urb' if the call to   usb_alloc_coherent() fails. Yes. thanks.  - If

[PATCH] media, tlg2300: Fix memory leak in alloc_bulk_urbs_generic()

2011-01-02 Thread Jesper Juhl
Hi, While reading drivers/media/video/tlg2300/pd-video.c::alloc_bulk_urbs_generic() I noticed that - We don't free the memory allocated to 'urb' if the call to usb_alloc_coherent() fails. - If the 'num' argument to the function is ever = 0 we'll return an uninitialized variable 'i'