summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTuo Li <islituo@gmail.com>2021-08-05 08:38:53 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-17 09:48:30 +0100
commitd5fb057f23643d19e4a0d21398aca33524d344f3 (patch)
tree4b0c8ea3387e2b37bc9d81556758548e0a0cd0f6 /lib
parente2c27194fcd9f9703d927aeea104ec304bcf0ae3 (diff)
ath: dfs_pattern_detector: Fix possible null-pointer dereference in channel_detector_create()
[ Upstream commit 4b6012a7830b813799a7faf40daa02a837e0fd5b ] kzalloc() is used to allocate memory for cd->detectors, and if it fails, channel_detector_exit() behind the label fail will be called: channel_detector_exit(dpd, cd); In channel_detector_exit(), cd->detectors is dereferenced through: struct pri_detector *de = cd->detectors[i]; To fix this possible null-pointer dereference, check cd->detectors before the for loop to dereference cd->detectors. Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Signed-off-by: Tuo Li <islituo@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210805153854.154066-1-islituo@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions