summaryrefslogtreecommitdiff
path: root/net/caif/cfserl.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2023-05-06 16:53:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-27 09:43:37 +0300
commitc62e2ac02e288b7e0039037e8e2e9759dafe8acf (patch)
tree0e3352924cf6d6c669a03c330886bb5b875ed9af /net/caif/cfserl.c
parent3ae910a375b67e51787978f224f5c4466cd4aa6e (diff)
downloadlinux-c62e2ac02e288b7e0039037e8e2e9759dafe8acf.tar.xz
wifi: mwifiex: Fix the size of a memory allocation in mwifiex_ret_802_11_scan()
[ Upstream commit d9aef04fcfa81ee4fb2804a21a3712b7bbd936af ] The type of "mwifiex_adapter->nd_info" is "struct cfg80211_wowlan_nd_info", not "struct cfg80211_wowlan_nd_match". Use struct_size() to ease the computation of the needed size. The current code over-allocates some memory, so is safe. But it wastes 32 bytes. Fixes: 7d7f07d8c5d3 ("mwifiex: add wowlan net-detect support") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/7a6074fb056d2181e058a3cc6048d8155c20aec7.1683371982.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/caif/cfserl.c')
0 files changed, 0 insertions, 0 deletions