summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorChen Changcheng <chenchangcheng@kylinos.cn>2026-07-15 09:56:00 +0800
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-07-15 17:12:55 +0200
commitbf2909f85c8cfb817d14a86129a579bd77595f3f (patch)
tree4eda05bc4469aae223dac2ca80056736be666d4a /tools/perf/scripts/python
parent330f2936ab768c7215322a476f033143e8891d28 (diff)
media: go7007: fix memory leaks on probe error paths
In go7007_register_encoder(), if any step after v4l2_device_register() fails (go7007_init_encoder, go7007_v4l2_ctrl_init, go7007_i2c_init, go7007_v4l2_init), the function returns directly without cleanup, leaking the registered V4L2 device and the control handler (if already initialized). Add cascade error labels that properly release resources according to how far initialization has progressed: - err_free_controls: frees the control handler - err_unregister_v4l2_dev: unregisters the V4L2 device (reached from any failure after v4l2_device_register) Signed-off-by: Chen Changcheng <chenchangcheng@kylinos.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions