diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-09-10 13:39:54 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-09-11 12:07:18 +0200 |
commit | b47f610bd6e88f9d1032132d81b23c928a645e9d (patch) | |
tree | b56c9e36f4748850cd1def47a92adbcda9d97c9f /net/wireless/ibss.c | |
parent | b1e9be8775b85d761cdb91386200a04d741f6a0d (diff) |
cfg80211: clear connect keys when freeing them
When freeing the connect keys, clear the memory to avoid
having the key material stick around in memory "forever".
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/ibss.c')
-rw-r--r-- | net/wireless/ibss.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index 8f345da3ea5..e24fc585c88 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c @@ -115,7 +115,7 @@ static int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, } if (WARN_ON(wdev->connect_keys)) - kfree(wdev->connect_keys); + kzfree(wdev->connect_keys); wdev->connect_keys = connkeys; wdev->ibss_fixed = params->channel_fixed; @@ -161,7 +161,7 @@ static void __cfg80211_clear_ibss(struct net_device *dev, bool nowext) ASSERT_WDEV_LOCK(wdev); - kfree(wdev->connect_keys); + kzfree(wdev->connect_keys); wdev->connect_keys = NULL; rdev_set_qos_map(rdev, dev, NULL); |