From: Johannes Berg Date: Wed, 10 Sep 2014 10:39:55 +0000 (+0300) Subject: mac80211: clear key material when freeing keys X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=29c3f9c3996abea060fa6e0b9e6a30d3f0cc828c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mac80211: clear key material when freeing keys When freeing the key, clear the memory to avoid having the key material stick around in memory "forever". Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/key.c b/net/mac80211/key.c index f320a04380b9..4712150dc210 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c @@ -422,7 +422,7 @@ static void ieee80211_key_free_common(struct ieee80211_key *key) ieee80211_aes_key_free(key->u.ccmp.tfm); if (key->conf.cipher == WLAN_CIPHER_SUITE_AES_CMAC) ieee80211_aes_cmac_key_free(key->u.aes_cmac.tfm); - kfree(key); + kzfree(key); } static void __ieee80211_key_destroy(struct ieee80211_key *key,