Skip to content

Commit

Permalink
V4L/DVB (7579): bttv: Fix memory leak in radio_release
Browse files Browse the repository at this point in the history
Fix the leak of the bttv_fh structure allocated in radio_open which
was introduced by commit 5cd3955.

Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Robert Fitzsimons authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent a53a455 commit b9bc07a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/video/bt8xx/bttv-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3463,6 +3463,9 @@ static int radio_release(struct inode *inode, struct file *file)
struct bttv *btv = fh->btv;
struct rds_command cmd;

file->private_data = NULL;
kfree(fh);

btv->radio_user--;

bttv_call_i2c_clients(btv, RDS_CMD_CLOSE, &cmd);
Expand Down

0 comments on commit b9bc07a

Please sign in to comment.