diff options
| author | 2026-07-24 10:52:18 +0800 | |
|---|---|---|
| committer | 2026-07-28 15:17:55 +0200 | |
| commit | e228b8b1a5b47a72b265671dc6d864c0da5528d0 (patch) | |
| tree | 9bcea1c538ae79e5e88bf574a38b359ebbed26ef /scripts/Makefile.thinlto | |
| parent | media: remove conditional return with no effect (diff) | |
media: cx88: fix memory leak in cx8802_register_driver() error path
In cx8802_register_driver(), when drv->probe(driver) fails (non-zero),
the allocated cx8802_driver struct is freed neither in the else branch
nor later in cx8802_unregister_driver() (which only frees entries that
were added to dev->drvlist on success). Each failed probe leaks the
driver struct.
Add kfree(driver) in the else branch to fix the leak.
Signed-off-by: Chen Changcheng <chenchangcheng@kylinos.cn>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
