]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: Fix possible memory leak in function cfg80211_bss_update
authorNguyen Dinh Phi <phind.uet@gmail.com>
Mon, 28 Jun 2021 13:23:34 +0000 (21:23 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 23 Jul 2021 08:38:18 +0000 (10:38 +0200)
commitfe2eed6a61d3330b4c1a620ad7b0f54b6fd509ba
tree4bd9a74ae3fd97b1a37d41255a4c207b32ab5fba
parent2b0d7dca79409fc92ddc7204258daf90950fe49f
cfg80211: Fix possible memory leak in function cfg80211_bss_update

When we exceed the limit of BSS entries, this function will free the
new entry, however, at this time, it is the last door to access the
inputed ies, so these ies will be unreferenced objects and cause memory
leak.
Therefore we should free its ies before deallocating the new entry, beside
of dropping it from hidden_list.

Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com>
Link: https://lore.kernel.org/r/20210628132334.851095-1-phind.uet@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c