Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6792eb0c authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Mauro Carvalho Chehab
Browse files

[media] bt8xx: fix memory leak



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>
parent 7cebf2ee
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -679,6 +679,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
		/*	DST is not a frontend, attaching the ASIC	*/
		if (dvb_attach(dst_attach, state, &card->dvb_adapter) == NULL) {
			pr_err("%s: Could not find a Twinhan DST\n", __func__);
			kfree(state);
			break;
		}
		/*	Attach other DST peripherals if any		*/