From: Ezequiel GarcĂ­a Date: Sat, 5 May 2012 19:13:22 +0000 (-0300) Subject: [media] em28xx: Fix memory leak on driver defered resource release X-Git-Tag: v3.5-rc5~26^2~145 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dedb8cb1d64a118ac21eaabd941ac0b9acdd82fb;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git [media] em28xx: Fix memory leak on driver defered resource release When the device is physically unplugged but there are still open file handles, resource release is defered until last opened handle is closed. This patch fixes a missing em28xx_fh struct release. Tested by compilation only. Signed-off-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 1d40680..50f5f4f 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -2260,6 +2260,7 @@ static int em28xx_v4l2_close(struct file *filp) em28xx_release_resources(dev); kfree(dev->alt_max_pkt_size); kfree(dev); + kfree(fh); return 0; }