Commit 3f84a4e1 authored by Jesper Juhl's avatar Jesper Juhl Committed by Mauro Carvalho Chehab

[media] cx23885: Don't leak firmware in cx23885_card_setup()

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: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 451a51b2
...@@ -1399,6 +1399,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) ...@@ -1399,6 +1399,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
else else
altera_init(&netup_config, fw); altera_init(&netup_config, fw);
release_firmware(fw);
break; break;
} }
} }
......
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