Skip to content

Commit

Permalink
[media] cx23885: Don't leak firmware in cx23885_card_setup()
Browse files Browse the repository at this point in the history
We leak the memory allocated to 'fw' (the firmware) when the variable goes
out of scope.
Fix the leak by calling release_firmware(fw) before 'fw' goes out of
scope.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Jesper Juhl authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent 451a51b commit 3f84a4e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/video/cx23885/cx23885-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
else
altera_init(&netup_config, fw);

release_firmware(fw);
break;
}
}
Expand Down

0 comments on commit 3f84a4e

Please sign in to comment.