summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-cards.c
diff options
context:
space:
mode:
authorChris Rankin <rankincj@yahoo.com>2011-09-04 20:38:14 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-18 12:58:01 +0200
commit16e3d2f4fab6e001a79705fa273418afc10188f8 (patch)
treec3d3ae94639e5c7c6f65394aeaeb55c2340ccc02 /drivers/media/video/em28xx/em28xx-cards.c
parentMerge tag 'v3.1-rc6' into staging/for_v3.2 (diff)
downloadlinux-16e3d2f4fab6e001a79705fa273418afc10188f8.tar.xz
linux-16e3d2f4fab6e001a79705fa273418afc10188f8.zip
[media] EM28xx - Fix memory leak on disconnect or error
Release the dev->alt_max_pkt_size buffer in all cases. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 5fddcd0869de..013e946bdc45 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -3201,6 +3201,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
retval = em28xx_init_dev(&dev, udev, interface, nr);
if (retval) {
mutex_unlock(&dev->lock);
+ kfree(dev->alt_max_pkt_size);
kfree(dev);
goto err;
}