diff options
author | Xin Xiong <[email protected]> | 2020-07-29 21:06:59 +0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2020-07-30 17:35:53 -0700 |
commit | 51875dad43b44241b46a569493f1e4bfa0386d86 (patch) | |
tree | 31e2041f798d1a07bc34de829316aac83526cc41 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 555a893303872e044fb86f0a5834ce78d41ad2e2 (diff) |
atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent
atmtcp_remove_persistent() invokes atm_dev_lookup(), which returns a
reference of atm_dev with increased refcount or NULL if fails.
The refcount leaks issues occur in two error handling paths. If
dev_data->persist is zero or PRIV(dev)->vcc isn't NULL, the function
returns 0 without decreasing the refcount kept by a local variable,
resulting in refcount leaks.
Fix the issue by adding atm_dev_put() before returning 0 both when
dev_data->persist is zero or PRIV(dev)->vcc isn't NULL.
Signed-off-by: Xin Xiong <[email protected]>
Signed-off-by: Xiyu Yang <[email protected]>
Signed-off-by: Xin Tan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions