]> 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)
commit47c669dfd33bd7cb002a9cf5add7b1490e485152
tree4bd9a74ae3fd97b1a37d41255a4c207b32ab5fba
parent3da75e94062c0c23f8c904c7f6987298646af069
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