diff options
author | Chris Rankin <rankincj@yahoo.com> | 2011-09-04 22:38:14 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-18 14:58:01 +0400 |
commit | 16e3d2f4fab6e001a79705fa273418afc10188f8 (patch) | |
tree | c3d3ae94639e5c7c6f65394aeaeb55c2340ccc02 /drivers/media/video/em28xx/em28xx-video.c | |
parent | 7577911244c437f4a4abac5e4b67b059c06dbe9d (diff) | |
download | linux-16e3d2f4fab6e001a79705fa273418afc10188f8.tar.xz |
[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-video.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index d176dc0394e2..61f35c8d66d2 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -2200,6 +2200,7 @@ static int em28xx_v4l2_close(struct file *filp) free the remaining resources */ if (dev->state & DEV_DISCONNECTED) { em28xx_release_resources(dev); + kfree(dev->alt_max_pkt_size); kfree(dev); return 0; } |