media: dvb-frontends: fix memory leaks
authorWenwen Wang <wenwen@cs.uga.edu>
Sat, 17 Aug 2019 06:42:24 +0000 (03:42 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 21 Aug 2019 21:39:54 +0000 (18:39 -0300)
commit8c3d3cdbd5dde9bc87d556d2daa9d771ac5254dc
tree12bbc92d50982d651fee2d8cbb3329f82b4d5a56
parent9fc3ce31f5bde660197f35135e90a1cced58aa2c
media: dvb-frontends: fix memory leaks

In dib7000pc_detection(), 'tx' and 'rx' are allocated through kzalloc()
respectively. However, if DiB7000PC is detected, they are not deallocated,
leading to memory leaks. To fix this issue, create a label to free 'tx' and
'rx' before returning from the function.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/dvb-frontends/dib7000p.c