mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 15:04:27 +08:00
media: ddbridge: fix resources cleanup for CI hardware
Do kfree() on port->en->data instead of port->en. port->en only holds a ptr to a struct dvb_ca_en50221, which is a member either of a memalloc'ed struct ddb_ci (DuoFlex CI, Octopus CI Duo) or a struct cxd (CXD2099AR based Single Flex, allocated by the cxd2099 driver). port->en.data though holds the ptr to the allocated memory, which must rather be kfree()'d. Change this accordingly. Cc: Ralph Metzler <rjkm@metzlerbros.de> Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
a1c484b3a0
commit
fac37bb124
@ -1990,7 +1990,7 @@ void ddb_ports_detach(struct ddb *dev)
|
||||
dvb_unregister_device(port->dvb[0].dev);
|
||||
if (port->en) {
|
||||
dvb_ca_en50221_release(port->en);
|
||||
kfree(port->en);
|
||||
kfree(port->en->data);
|
||||
port->en = NULL;
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user