diff options
| author | Dongliang Mu <[email protected]> | 2021-11-01 09:55:39 +0000 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2021-11-15 08:12:02 +0000 |
| commit | 22be5a10d0b24eec9e45decd15d7e6112b25f080 (patch) | |
| tree | 028606e178608e4f04a542c0218306169210927b /tools/perf/scripts/python/bin | |
| parent | 91bd11a4a56895a9bf03c0be4ff15bd7caaaee0d (diff) | |
media: em28xx: fix memory leak in em28xx_init_dev
In the em28xx_init_rev, if em28xx_audio_setup fails, this function fails
to deallocate the media_dev allocated in the em28xx_media_device_init.
Fix this by adding em28xx_unregister_media_device to free media_dev.
BTW, this patch is tested in my local syzkaller instance, and it can
prevent the memory leak from occurring again.
CC: Pavel Skripkin <[email protected]>
Fixes: 37ecc7b1278f ("[media] em28xx: add media controller support")
Signed-off-by: Dongliang Mu <[email protected]>
Reported-by: syzkaller <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions