diff options
author | Colin Ian King <[email protected]> | 2019-12-20 22:05:26 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2020-01-14 15:37:41 +0100 |
commit | 704a940d551c9946bce3fdd661e00a6370c40522 (patch) | |
tree | 27e982aed465eff3502b9a44c2ed20fa66ca9ab1 /tools/perf/scripts/python/stackcollapse.py | |
parent | 845f081002eebd7a1216fc0a5ef2c862dc6d093e (diff) |
thunderbolt: fix memory leak of object sw
In the case where the call tb_switch_exceeds_max_depth is true
the error reurn path leaks memory in sw. Fix this by setting
the return error code to -EADDRNOTAVAIL and returning via the
error exit path err_free_sw_ports to free sw. sw has been kzalloc'd
so the free of the NULL sw->ports is fine.
Addresses-Coverity: ("Resource leak")
Fixes: b04079837b20 ("thunderbolt: Add initial support for USB4")
Signed-off-by: Colin Ian King <[email protected]>
Acked-by: Mika Westerberg <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions