diff options
| author | Christophe JAILLET <[email protected]> | 2023-06-14 20:31:05 +0200 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2023-07-14 13:20:31 +0200 |
| commit | d7b13edd4cb4bfa335b6008ab867ac28582d3e5c (patch) | |
| tree | 0928717bca1c45f0113b021108383563a52b61c7 /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | 6363db1c9d45a54ddc1582423b74b5f9935b5958 (diff) | |
media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link()
If fwnode_graph_get_remote_endpoint() fails, 'fwnode' is known to be NULL,
so fwnode_handle_put() is a no-op.
Release the reference taken from a previous fwnode_graph_get_port_parent()
call instead.
Also handle fwnode_graph_get_port_parent() failures.
In order to fix these issues, add an error handling path to the function
and the needed gotos.
Fixes: ca50c197bd96 ("[media] v4l: fwnode: Support generic fwnode for parsing standardised properties")
Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions