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>
diff --git a/net/wireless/util.c b/net/wireless/util.c
index a8b2816..5e233a5 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -797,7 +797,7 @@
netdev_err(dev, "failed to set mgtdef %d\n", i);
}
- kfree(wdev->connect_keys);
+ kzfree(wdev->connect_keys);
wdev->connect_keys = NULL;
}