diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-11-21 06:26:49 +0300 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-02 08:12:05 +0300 |
commit | 571d6eee9b5bce28fcbeb7588890ad5ca3f8c718 (patch) | |
tree | 38ad5d544dc9c14fc49a03957c24ee7a2e450b60 /net/ieee80211/ieee80211_module.c | |
parent | 8e87295b9578fa46b5f325a7dc42ddbbdad6e0d0 (diff) | |
download | linux-571d6eee9b5bce28fcbeb7588890ad5ca3f8c718.tar.xz |
[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>
Diffstat (limited to 'net/ieee80211/ieee80211_module.c')
-rw-r--r-- | net/ieee80211/ieee80211_module.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ieee80211/ieee80211_module.c b/net/ieee80211/ieee80211_module.c index 2b14c2f3e21d..f16e60ee9ce9 100644 --- a/net/ieee80211/ieee80211_module.c +++ b/net/ieee80211/ieee80211_module.c @@ -67,7 +67,7 @@ static int ieee80211_networks_allocate(struct ieee80211_device *ieee) return 0; ieee->networks = - kmalloc(MAX_NETWORK_COUNT * sizeof(struct ieee80211_network), + kzalloc(MAX_NETWORK_COUNT * sizeof(struct ieee80211_network), GFP_KERNEL); if (!ieee->networks) { printk(KERN_WARNING "%s: Out of memory allocating beacons\n", @@ -75,9 +75,6 @@ static int ieee80211_networks_allocate(struct ieee80211_device *ieee) return -ENOMEM; } - memset(ieee->networks, 0, - MAX_NETWORK_COUNT * sizeof(struct ieee80211_network)); - return 0; } |