[PATCH] Check ieee80211softmac_auth_resp kmalloc result

And use kmemdup and kzalloc where applicable

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Arnaldo Carvalho de Melo
2006-11-21 01:26:49 -02:00
committed by Jeff Garzik
parent 8e87295b95
commit 571d6eee9b
3 changed files with 14 additions and 12 deletions

View File

@@ -1304,12 +1304,11 @@ static int ieee80211_parse_info_param(struct ieee80211_info_element
case MFIE_TYPE_IBSS_DFS:
if (network->ibss_dfs)
break;
network->ibss_dfs =
kmalloc(info_element->len, GFP_ATOMIC);
network->ibss_dfs = kmemdup(info_element->data,
info_element->len,
GFP_ATOMIC);
if (!network->ibss_dfs)
return 1;
memcpy(network->ibss_dfs, info_element->data,
info_element->len);
network->flags |= NETWORK_HAS_IBSS_DFS;
break;