diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-28 01:19:40 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-28 01:19:40 -0700 |
commit | 1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9 (patch) | |
tree | fe3dc41cbb47ae12b7c3faf6a88b097349e50d5a /net/mac80211/key.c | |
parent | e35c3269edba151e1c703d87068a28ce2cd65bb0 (diff) | |
parent | d420895efb259a78dda50f95289571faa6e10e41 (diff) | |
download | linux-3.10-1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9.tar.gz linux-3.10-1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9.tar.bz2 linux-3.10-1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9.zip |
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.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index d4893bd1775..6597c779e35 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c @@ -387,6 +387,15 @@ void ieee80211_key_free(struct ieee80211_key *key) if (!key) return; + if (!key->sdata) { + /* The key has not been linked yet, simply free it + * and don't Oops */ + if (key->conf.alg == ALG_CCMP) + ieee80211_aes_key_free(key->u.ccmp.tfm); + kfree(key); + return; + } + spin_lock_irqsave(&key->sdata->local->key_lock, flags); __ieee80211_key_free(key); spin_unlock_irqrestore(&key->sdata->local->key_lock, flags); |