mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
bec09bced1
commit
ba36d10ed1
1 changed files with 2 additions and 2 deletions
|
@ -581,8 +581,8 @@ wilc_wfi_cfg_alloc_fill_ssid(struct cfg80211_scan_request *request,
|
|||
int i;
|
||||
int slot_id = 0;
|
||||
|
||||
ntwk->net_info = kcalloc(request->n_ssids,
|
||||
sizeof(struct hidden_network), GFP_KERNEL);
|
||||
ntwk->net_info = kcalloc(request->n_ssids, sizeof(*ntwk->net_info),
|
||||
GFP_KERNEL);
|
||||
if (!ntwk->net_info)
|
||||
goto out;
|
||||
|
||||
|
|
Loading…
Reference in a new issue