forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/net/wireless/marvell/mwifiex/scan.c
....@@ -2200,9 +2200,9 @@
22002200
22012201 if (nd_config) {
22022202 adapter->nd_info =
2203
- kzalloc(sizeof(struct cfg80211_wowlan_nd_match) +
2204
- sizeof(struct cfg80211_wowlan_nd_match *) *
2205
- scan_rsp->number_of_sets, GFP_ATOMIC);
2203
+ kzalloc(struct_size(adapter->nd_info, matches,
2204
+ scan_rsp->number_of_sets),
2205
+ GFP_ATOMIC);
22062206
22072207 if (adapter->nd_info)
22082208 adapter->nd_info->n_matches = scan_rsp->number_of_sets;