aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/key.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-06-28 04:19:40 -0400
committerDavid S. Miller <davem@davemloft.net>2008-06-28 04:19:40 -0400
commit1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9 (patch)
treefe3dc41cbb47ae12b7c3faf6a88b097349e50d5a /net/mac80211/key.c
parente35c3269edba151e1c703d87068a28ce2cd65bb0 (diff)
parentd420895efb259a78dda50f95289571faa6e10e41 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/wireless/iwlwifi/iwl4965-base.c
Diffstat (limited to 'net/mac80211/key.c')
-rw-r--r--net/mac80211/key.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index d4893bd17754..6597c779e35a 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -387,6 +387,15 @@ void ieee80211_key_free(struct ieee80211_key *key)
387 if (!key) 387 if (!key)
388 return; 388 return;
389 389
390 if (!key->sdata) {
391 /* The key has not been linked yet, simply free it
392 * and don't Oops */
393 if (key->conf.alg == ALG_CCMP)
394 ieee80211_aes_key_free(key->u.ccmp.tfm);
395 kfree(key);
396 return;
397 }
398
390 spin_lock_irqsave(&key->sdata->local->key_lock, flags); 399 spin_lock_irqsave(&key->sdata->local->key_lock, flags);
391 __ieee80211_key_free(key); 400 __ieee80211_key_free(key);
392 spin_unlock_irqrestore(&key->sdata->local->key_lock, flags); 401 spin_unlock_irqrestore(&key->sdata->local->key_lock, flags);