Commit dedb8cb1 authored by Ezequiel García's avatar Ezequiel García Committed by Mauro Carvalho Chehab

[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: default avatarEzequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 61282daf
...@@ -2260,6 +2260,7 @@ static int em28xx_v4l2_close(struct file *filp) ...@@ -2260,6 +2260,7 @@ static int em28xx_v4l2_close(struct file *filp)
em28xx_release_resources(dev); em28xx_release_resources(dev);
kfree(dev->alt_max_pkt_size); kfree(dev->alt_max_pkt_size);
kfree(dev); kfree(dev);
kfree(fh);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment