Commit ba36d10e authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

staging: wilc1000: allocate less memory

We should be allocating space for hidden_network_info structs.  They are
slightly smaller than hidden_network structs.  This bug doesn't cause a
runtime issue beyond the very small ammount of extra memory used.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bec09bce
...@@ -581,8 +581,8 @@ wilc_wfi_cfg_alloc_fill_ssid(struct cfg80211_scan_request *request, ...@@ -581,8 +581,8 @@ wilc_wfi_cfg_alloc_fill_ssid(struct cfg80211_scan_request *request,
int i; int i;
int slot_id = 0; int slot_id = 0;
ntwk->net_info = kcalloc(request->n_ssids, ntwk->net_info = kcalloc(request->n_ssids, sizeof(*ntwk->net_info),
sizeof(struct hidden_network), GFP_KERNEL); GFP_KERNEL);
if (!ntwk->net_info) if (!ntwk->net_info)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment