Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/net80211 Set freed memory to NULL. This avoids a ...
details: https://anonhg.NetBSD.org/src-all/rev/81b686cbf68e
branches: trunk
changeset: 377029:81b686cbf68e
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Sun Nov 07 13:19:20 2021 +1100
description:
Set freed memory to NULL. This avoids a crash with ies->data.
diffstat:
sys/net80211/ieee80211_node.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (19 lines):
diff -r 7c5dd2c28a38 -r 81b686cbf68e sys/net80211/ieee80211_node.c
--- a/sys/net80211/ieee80211_node.c Tue Nov 02 17:18:28 2021 +0100
+++ b/sys/net80211/ieee80211_node.c Sun Nov 07 13:19:20 2021 +1100
@@ -1188,6 +1188,7 @@ ieee80211_ies_cleanup(struct ieee80211_i
{
if (ies->data != NULL)
IEEE80211_MFREE(ies->data, M_80211_NODE_IE, ies->len);
+ ies->data = NULL;
}
/*
@@ -1353,6 +1354,7 @@ node_free(struct ieee80211_node *ni)
ieee80211_ies_cleanup(&ni->ni_ies);
ieee80211_psq_cleanup(&ni->ni_psq);
IEEE80211_MFREE(ni, M_80211_NODE, sizeof(*ni));
+ ni = NULL;
}
static void
Home |
Main Index |
Thread Index |
Old Index