[media] em28xx: Fix memory leak on driver defered resource release
authorEzequiel García <elezegarcia@gmail.com>
Sat, 5 May 2012 19:13:22 +0000 (16:13 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 18 May 2012 18:51:07 +0000 (15:51 -0300)
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 <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/em28xx/em28xx-video.c

index 1d40680..50f5f4f 100644 (file)
@@ -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;
                }