summaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_crypto_wep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net80211/ieee80211_crypto_wep.c')
-rw-r--r--sys/net80211/ieee80211_crypto_wep.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_crypto_wep.c b/sys/net80211/ieee80211_crypto_wep.c
index 2e7958899a9..0bc428091c9 100644
--- a/sys/net80211/ieee80211_crypto_wep.c
+++ b/sys/net80211/ieee80211_crypto_wep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_crypto_wep.c,v 1.14 2015/11/24 13:45:06 mpi Exp $ */
+/* $OpenBSD: ieee80211_crypto_wep.c,v 1.15 2017/03/23 04:10:10 tb Exp $ */
/*-
* Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
@@ -66,8 +66,10 @@ ieee80211_wep_set_key(struct ieee80211com *ic, struct ieee80211_key *k)
void
ieee80211_wep_delete_key(struct ieee80211com *ic, struct ieee80211_key *k)
{
- if (k->k_priv != NULL)
- free(k->k_priv, M_DEVBUF, 0);
+ if (k->k_priv != NULL) {
+ explicit_bzero(k->k_priv, sizeof(struct ieee80211_wep_ctx));
+ free(k->k_priv, M_DEVBUF, sizeof(struct ieee80211_wep_ctx));
+ }
k->k_priv = NULL;
}