]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita91393115a2614bc605f74a52a01346f68438866
tree12bbc92d50982d651fee2d8cbb3329f82b4d5a56
parent3f14732e40feb3050ac40c25be42a25473ecd1db
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