aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/Context.c
diff options
context:
space:
mode:
authorDongliang Mu <[email protected]>2021-06-16 10:09:01 +0800
committerStefan Schmidt <[email protected]>2021-06-22 21:09:53 +0200
commit28a5501c3383f0e6643012c187b7c2027ef42aea (patch)
tree0196285db8eef1a31a6c117be5c5fa8a8f87389a /tools/perf/scripts/python/Perf-Trace-Util/Context.c
parentab372c2293f5d0b279f31c8d768566ea37602dc9 (diff)
ieee802154: hwsim: Fix memory leak in hwsim_add_one
No matter from hwsim_remove or hwsim_del_radio_nl, hwsim_del fails to remove the entry in the edges list. Take the example below, phy0, phy1 and e0 will be deleted, resulting in e1 not freed and accessed in the future. hwsim_phys | ------------------------------ | | phy0 (edges) phy1 (edges) ----> e1 (idx = 1) ----> e0 (idx = 0) Fix this by deleting and freeing all the entries in the edges list between hwsim_edge_unsubscribe_me and list_del(&phy->list). Reported-by: [email protected] Fixes: 1c9f4a3fce77 ("ieee802154: hwsim: fix rcu handling") Signed-off-by: Dongliang Mu <[email protected]> Acked-by: Alexander Aring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stefan Schmidt <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/Context.c')
0 files changed, 0 insertions, 0 deletions