[media] easycap: Fix mem leak in easycap_usb_probe()
authorJesper Juhl <jj@chaosbits.net>
Sun, 29 Jan 2012 19:55:28 +0000 (16:55 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 8 Feb 2012 14:38:57 +0000 (12:38 -0200)
If allocating 'pdata_urb' fails, the function will return -ENOMEM
without freeing the memory allocated, just a few lines above, for
'purb' and will leak that memory when 'purb' goes out of scope.

This patch resolves the leak by freeing the allocated storage with
usb_free_urb() before the return.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

No differences found