Commit 680a572f authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Thadeu Lima de Souza Cascardo

bt8xx: fix memory leak

BugLink: http://bugs.launchpad.net/bugs/1731915

[ Upstream commit 6792eb0c ]

If dvb_attach() fails then we were just printing an error message and
exiting but the memory allocated to state was not released.
Signed-off-by: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent ab037899
...@@ -680,6 +680,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) ...@@ -680,6 +680,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
/* DST is not a frontend, attaching the ASIC */ /* DST is not a frontend, attaching the ASIC */
if (dvb_attach(dst_attach, state, &card->dvb_adapter) == NULL) { if (dvb_attach(dst_attach, state, &card->dvb_adapter) == NULL) {
pr_err("%s: Could not find a Twinhan DST\n", __func__); pr_err("%s: Could not find a Twinhan DST\n", __func__);
kfree(state);
break; break;
} }
/* Attach other DST peripherals if any */ /* Attach other DST peripherals if any */
......
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