diff options
author | Wenwen Wang <wenwen@cs.uga.edu> | 2019-08-18 06:45:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-05 13:47:54 +0300 |
commit | 1399a136127bfe1b9bb7c951d9851da62a519121 (patch) | |
tree | e98601c662f1c6ea13e9137cc68353a486e91f0e /tools/perf | |
parent | 2b0354c44763c9b0f0a6fad4da2c6d467b7a696a (diff) | |
download | linux-1399a136127bfe1b9bb7c951d9851da62a519121.tar.xz |
media: dvb-core: fix a memory leak bug
[ Upstream commit fcd5ce4b3936242e6679875a4d3c3acfc8743e15 ]
In dvb_create_media_entity(), 'dvbdev->entity' is allocated through
kzalloc(). Then, 'dvbdev->pads' is allocated through kcalloc(). However, if
kcalloc() fails, the allocated 'dvbdev->entity' is not deallocated, leading
to a memory leak bug. To fix this issue, free 'dvbdev->entity' before
returning -ENOMEM.
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf')
0 files changed, 0 insertions, 0 deletions