Skip to content

Commit

Permalink
[media] em28xx: Fix memory leak on driver defered resource release
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ezequiel García authored and Mauro Carvalho Chehab committed May 18, 2012
1 parent 61282da commit dedb8cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit dedb8cb

Please sign in to comment.