From 66f807ed8b3634dc73d9f7526c484e43f094c0ee Mon Sep 17 00:00:00 2001 From: des Date: Thu, 23 Oct 2008 15:53:51 +0000 Subject: Retire the MALLOC and FREE macros. They are an abomination unto style(9). MFC after: 3 months --- sys/net80211/ieee80211_acl.c | 14 +++++++------- sys/net80211/ieee80211_crypto_ccmp.c | 4 ++-- sys/net80211/ieee80211_crypto_tkip.c | 4 ++-- sys/net80211/ieee80211_crypto_wep.c | 4 ++-- sys/net80211/ieee80211_freebsd.c | 4 ++-- sys/net80211/ieee80211_hostap.c | 4 ++-- sys/net80211/ieee80211_input.c | 2 +- sys/net80211/ieee80211_ioctl.c | 27 ++++++++++++--------------- sys/net80211/ieee80211_node.c | 22 ++++++++++------------ sys/net80211/ieee80211_power.c | 4 ++-- sys/net80211/ieee80211_proto.c | 2 +- sys/net80211/ieee80211_scan.c | 4 ++-- sys/net80211/ieee80211_scan_sta.c | 10 +++++----- sys/net80211/ieee80211_sta.c | 2 +- 14 files changed, 51 insertions(+), 56 deletions(-) (limited to 'sys/net80211') diff --git a/sys/net80211/ieee80211_acl.c b/sys/net80211/ieee80211_acl.c index 13407a4..b638834 100644 --- a/sys/net80211/ieee80211_acl.c +++ b/sys/net80211/ieee80211_acl.c @@ -99,7 +99,7 @@ acl_attach(struct ieee80211vap *vap) { struct aclstate *as; - MALLOC(as, struct aclstate *, sizeof(struct aclstate), + as = malloc(sizeof(struct aclstate), M_80211_ACL, M_NOWAIT | M_ZERO); if (as == NULL) return 0; @@ -123,7 +123,7 @@ acl_detach(struct ieee80211vap *vap) acl_free_all(vap); vap->iv_as = NULL; ACL_LOCK_DESTROY(as); - FREE(as, M_80211_ACL); + free(as, M_80211_ACL); } static __inline struct acl * @@ -147,7 +147,7 @@ _acl_free(struct aclstate *as, struct acl *acl) TAILQ_REMOVE(&as->as_list, acl, acl_list); LIST_REMOVE(acl, acl_hash); - FREE(acl, M_80211_ACL); + free(acl, M_80211_ACL); as->as_nacls--; } @@ -175,7 +175,7 @@ acl_add(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) struct acl *acl, *new; int hash; - MALLOC(new, struct acl *, sizeof(struct acl), M_80211_ACL, M_NOWAIT | M_ZERO); + new = malloc(sizeof(struct acl), M_80211_ACL, M_NOWAIT | M_ZERO); if (new == NULL) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_ACL, "ACL: add %s failed, no memory\n", ether_sprintf(mac)); @@ -188,7 +188,7 @@ acl_add(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) { if (IEEE80211_ADDR_EQ(acl->acl_macaddr, mac)) { ACL_UNLOCK(as); - FREE(new, M_80211_ACL); + free(new, M_80211_ACL); IEEE80211_DPRINTF(vap, IEEE80211_MSG_ACL, "ACL: add %s failed, already present\n", ether_sprintf(mac)); @@ -301,7 +301,7 @@ acl_getioctl(struct ieee80211vap *vap, struct ieee80211req *ireq) ireq->i_len = space; /* return required space */ return 0; /* NB: must not error */ } - MALLOC(ap, struct ieee80211req_maclist *, space, + ap = malloc(space, M_TEMP, M_NOWAIT); if (ap == NULL) return ENOMEM; @@ -317,7 +317,7 @@ acl_getioctl(struct ieee80211vap *vap, struct ieee80211req *ireq) ireq->i_len = space; } else error = copyout(ap, ireq->i_data, ireq->i_len); - FREE(ap, M_TEMP); + free(ap, M_TEMP); return error; } return EINVAL; diff --git a/sys/net80211/ieee80211_crypto_ccmp.c b/sys/net80211/ieee80211_crypto_ccmp.c index bdaf7e3..67679f5 100644 --- a/sys/net80211/ieee80211_crypto_ccmp.c +++ b/sys/net80211/ieee80211_crypto_ccmp.c @@ -96,7 +96,7 @@ ccmp_attach(struct ieee80211vap *vap, struct ieee80211_key *k) { struct ccmp_ctx *ctx; - MALLOC(ctx, struct ccmp_ctx *, sizeof(struct ccmp_ctx), + ctx = malloc(sizeof(struct ccmp_ctx), M_80211_CRYPTO, M_NOWAIT | M_ZERO); if (ctx == NULL) { vap->iv_stats.is_crypto_nomem++; @@ -113,7 +113,7 @@ ccmp_detach(struct ieee80211_key *k) { struct ccmp_ctx *ctx = k->wk_private; - FREE(ctx, M_80211_CRYPTO); + free(ctx, M_80211_CRYPTO); KASSERT(nrefs > 0, ("imbalanced attach/detach")); nrefs--; /* NB: we assume caller locking */ } diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c index f509856..744b643 100644 --- a/sys/net80211/ieee80211_crypto_tkip.c +++ b/sys/net80211/ieee80211_crypto_tkip.c @@ -109,7 +109,7 @@ tkip_attach(struct ieee80211vap *vap, struct ieee80211_key *k) { struct tkip_ctx *ctx; - MALLOC(ctx, struct tkip_ctx *, sizeof(struct tkip_ctx), + ctx = malloc(sizeof(struct tkip_ctx), M_80211_CRYPTO, M_NOWAIT | M_ZERO); if (ctx == NULL) { vap->iv_stats.is_crypto_nomem++; @@ -126,7 +126,7 @@ tkip_detach(struct ieee80211_key *k) { struct tkip_ctx *ctx = k->wk_private; - FREE(ctx, M_80211_CRYPTO); + free(ctx, M_80211_CRYPTO); KASSERT(nrefs > 0, ("imbalanced attach/detach")); nrefs--; /* NB: we assume caller locking */ } diff --git a/sys/net80211/ieee80211_crypto_wep.c b/sys/net80211/ieee80211_crypto_wep.c index 7eade59..dc31e0b 100644 --- a/sys/net80211/ieee80211_crypto_wep.c +++ b/sys/net80211/ieee80211_crypto_wep.c @@ -87,7 +87,7 @@ wep_attach(struct ieee80211vap *vap, struct ieee80211_key *k) { struct wep_ctx *ctx; - MALLOC(ctx, struct wep_ctx *, sizeof(struct wep_ctx), + ctx = malloc(sizeof(struct wep_ctx), M_80211_CRYPTO, M_NOWAIT | M_ZERO); if (ctx == NULL) { vap->iv_stats.is_crypto_nomem++; @@ -106,7 +106,7 @@ wep_detach(struct ieee80211_key *k) { struct wep_ctx *ctx = k->wk_private; - FREE(ctx, M_80211_CRYPTO); + free(ctx, M_80211_CRYPTO); KASSERT(nrefs > 0, ("imbalanced attach/detach")); nrefs--; /* NB: we assume caller locking */ } diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c index 71174b7..8ca0197 100644 --- a/sys/net80211/ieee80211_freebsd.c +++ b/sys/net80211/ieee80211_freebsd.c @@ -234,7 +234,7 @@ ieee80211_sysctl_vattach(struct ieee80211vap *vap) struct sysctl_oid *oid; char num[14]; /* sufficient for 32 bits */ - MALLOC(ctx, struct sysctl_ctx_list *, sizeof(struct sysctl_ctx_list), + ctx = malloc(sizeof(struct sysctl_ctx_list), M_DEVBUF, M_NOWAIT | M_ZERO); if (ctx == NULL) { if_printf(ifp, "%s: cannot allocate sysctl context!\n", @@ -310,7 +310,7 @@ ieee80211_sysctl_vdetach(struct ieee80211vap *vap) if (vap->iv_sysctl != NULL) { sysctl_ctx_free(vap->iv_sysctl); - FREE(vap->iv_sysctl, M_DEVBUF); + free(vap->iv_sysctl, M_DEVBUF); vap->iv_sysctl = NULL; } } diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index c0a99a1..37d2c2f 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -902,7 +902,7 @@ hostap_auth_open(struct ieee80211_node *ni, struct ieee80211_frame *wh, * open auth is attempted. */ if (ni->ni_challenge != NULL) { - FREE(ni->ni_challenge, M_80211_NODE); + free(ni->ni_challenge, M_80211_NODE); ni->ni_challenge = NULL; } /* XXX hack to workaround calling convention */ @@ -1986,7 +1986,7 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, return; /* discard challenge after association */ if (ni->ni_challenge != NULL) { - FREE(ni->ni_challenge, M_80211_NODE); + free(ni->ni_challenge, M_80211_NODE); ni->ni_challenge = NULL; } /* NB: 802.11 spec says to ignore station's privacy bit */ diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 67bcd43..4a83111 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -499,7 +499,7 @@ int ieee80211_alloc_challenge(struct ieee80211_node *ni) { if (ni->ni_challenge == NULL) - MALLOC(ni->ni_challenge, uint32_t*, IEEE80211_CHALLENGE_LEN, + ni->ni_challenge = malloc(IEEE80211_CHALLENGE_LEN, M_80211_NODE, M_NOWAIT); if (ni->ni_challenge == NULL) { IEEE80211_NOTE(ni->ni_vap, diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index cab8b33..c9f4995 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -320,14 +320,14 @@ ieee80211_ioctl_getscanresults(struct ieee80211vap *vap, space = req.space; /* XXX M_WAITOK after driver lock released */ - MALLOC(p, void *, space, M_TEMP, M_NOWAIT | M_ZERO); + p = malloc(space, M_TEMP, M_NOWAIT | M_ZERO); if (p == NULL) return ENOMEM; req.sr = p; ieee80211_scan_iterate(vap, get_scan_result, &req); ireq->i_len = space - req.space; error = copyout(p, ireq->i_data, ireq->i_len); - FREE(p, M_TEMP); + free(p, M_TEMP); } else ireq->i_len = 0; @@ -467,7 +467,7 @@ getstainfo_common(struct ieee80211vap *vap, struct ieee80211req *ireq, if (req.space > 0) { space = req.space; /* XXX M_WAITOK after driver lock released */ - MALLOC(p, void *, space, M_TEMP, M_NOWAIT | M_ZERO); + p = malloc(space, M_TEMP, M_NOWAIT | M_ZERO); if (p == NULL) { error = ENOMEM; goto bad; @@ -479,7 +479,7 @@ getstainfo_common(struct ieee80211vap *vap, struct ieee80211req *ireq, get_sta_info(&req, ni); ireq->i_len = space - req.space; error = copyout(p, (uint8_t *) ireq->i_data+off, ireq->i_len); - FREE(p, M_TEMP); + free(p, M_TEMP); } else ireq->i_len = 0; bad: @@ -696,8 +696,7 @@ ieee80211_ioctl_getdevcaps(struct ieee80211com *ic, if (ireq->i_len != sizeof(struct ieee80211_devcaps_req)) return EINVAL; - MALLOC(dc, struct ieee80211_devcaps_req *, - sizeof(struct ieee80211_devcaps_req), M_TEMP, M_NOWAIT | M_ZERO); + dc = malloc( sizeof(struct ieee80211_devcaps_req), M_TEMP, M_NOWAIT | M_ZERO); if (dc == NULL) return ENOMEM; dc->dc_drivercaps = ic->ic_caps; @@ -707,7 +706,7 @@ ieee80211_ioctl_getdevcaps(struct ieee80211com *ic, ic->ic_getradiocaps(ic, &ci->ic_nchans, ci->ic_chans); ieee80211_sort_channels(ci->ic_chans, ci->ic_nchans); error = copyout(dc, ireq->i_data, sizeof(*dc)); - FREE(dc, M_TEMP); + free(dc, M_TEMP); return error; } @@ -1993,14 +1992,13 @@ ieee80211_ioctl_setregdomain(struct ieee80211vap *vap, if (ireq->i_len != sizeof(struct ieee80211_regdomain_req)) return EINVAL; - MALLOC(reg, struct ieee80211_regdomain_req *, - sizeof(struct ieee80211_regdomain_req), M_TEMP, M_NOWAIT); + reg = malloc( sizeof(struct ieee80211_regdomain_req), M_TEMP, M_NOWAIT); if (reg == NULL) return ENOMEM; error = copyin(ireq->i_data, reg, sizeof(*reg)); if (error == 0) error = ieee80211_setregdomain(vap, reg); - FREE(reg, M_TEMP); + free(reg, M_TEMP); return (error == 0 ? ENETRESET : error); } @@ -2139,7 +2137,7 @@ setappie(struct ieee80211_appie **aie, const struct ieee80211req *ireq) if (ireq->i_len == 0) { /* delete any existing ie */ if (app != NULL) { *aie = NULL; /* XXX racey */ - FREE(app, M_80211_NODE_IE); + free(app, M_80211_NODE_IE); } return 0; } @@ -2153,20 +2151,19 @@ setappie(struct ieee80211_appie **aie, const struct ieee80211req *ireq) * * XXX bad bad bad */ - MALLOC(napp, struct ieee80211_appie *, - sizeof(struct ieee80211_appie) + ireq->i_len, M_80211_NODE_IE, M_NOWAIT); + napp = malloc( sizeof(struct ieee80211_appie) + ireq->i_len, M_80211_NODE_IE, M_NOWAIT); if (napp == NULL) return ENOMEM; /* XXX holding ic lock */ error = copyin(ireq->i_data, napp->ie_data, ireq->i_len); if (error) { - FREE(napp, M_80211_NODE_IE); + free(napp, M_80211_NODE_IE); return error; } napp->ie_len = ireq->i_len; *aie = napp; if (app != NULL) - FREE(app, M_80211_NODE_IE); + free(app, M_80211_NODE_IE); return 0; } diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index f7aa3a9..bfdc64b 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -148,8 +148,7 @@ ieee80211_node_latevattach(struct ieee80211vap *vap) "WARNING: max aid too small, changed to %d\n", vap->iv_max_aid); } - MALLOC(vap->iv_aid_bitmap, uint32_t *, - howmany(vap->iv_max_aid, 32) * sizeof(uint32_t), + vap->iv_aid_bitmap = malloc( howmany(vap->iv_max_aid, 32) * sizeof(uint32_t), M_80211_NODE, M_NOWAIT | M_ZERO); if (vap->iv_aid_bitmap == NULL) { /* XXX no way to recover */ @@ -175,7 +174,7 @@ ieee80211_node_vdetach(struct ieee80211vap *vap) vap->iv_bss = NULL; } if (vap->iv_aid_bitmap != NULL) { - FREE(vap->iv_aid_bitmap, M_80211_NODE); + free(vap->iv_aid_bitmap, M_80211_NODE); vap->iv_aid_bitmap = NULL; } } @@ -769,7 +768,7 @@ node_alloc(struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN]) { struct ieee80211_node *ni; - MALLOC(ni, struct ieee80211_node *, sizeof(struct ieee80211_node), + ni = malloc(sizeof(struct ieee80211_node), M_80211_NODE, M_NOWAIT | M_ZERO); return ni; } @@ -787,11 +786,11 @@ ieee80211_ies_init(struct ieee80211_ies *ies, const uint8_t *data, int len) memset(ies, 0, offsetof(struct ieee80211_ies, data)); if (ies->data != NULL && ies->len != len) { /* data size changed */ - FREE(ies->data, M_80211_NODE_IE); + free(ies->data, M_80211_NODE_IE); ies->data = NULL; } if (ies->data == NULL) { - MALLOC(ies->data, uint8_t *, len, M_80211_NODE_IE, M_NOWAIT); + ies->data = malloc(len, M_80211_NODE_IE, M_NOWAIT); if (ies->data == NULL) { ies->len = 0; /* NB: pointers have already been zero'd above */ @@ -810,7 +809,7 @@ void ieee80211_ies_cleanup(struct ieee80211_ies *ies) { if (ies->data != NULL) - FREE(ies->data, M_80211_NODE_IE); + free(ies->data, M_80211_NODE_IE); } /* @@ -890,7 +889,7 @@ node_cleanup(struct ieee80211_node *ni) ni->ni_associd = 0; if (ni->ni_challenge != NULL) { - FREE(ni->ni_challenge, M_80211_NODE); + free(ni->ni_challenge, M_80211_NODE); ni->ni_challenge = NULL; } /* @@ -926,7 +925,7 @@ node_free(struct ieee80211_node *ni) ieee80211_ies_cleanup(&ni->ni_ies); IEEE80211_NODE_SAVEQ_DESTROY(ni); IEEE80211_NODE_WDSQ_DESTROY(ni); - FREE(ni, M_80211_NODE); + free(ni, M_80211_NODE); } static void @@ -1778,8 +1777,7 @@ ieee80211_node_table_init(struct ieee80211com *ic, nt->nt_inact_init = inact; nt->nt_keyixmax = keyixmax; if (nt->nt_keyixmax > 0) { - MALLOC(nt->nt_keyixmap, struct ieee80211_node **, - keyixmax * sizeof(struct ieee80211_node *), + nt->nt_keyixmap = malloc( keyixmax * sizeof(struct ieee80211_node *), M_80211_NODE, M_NOWAIT | M_ZERO); if (nt->nt_keyixmap == NULL) if_printf(ic->ic_ifp, @@ -1839,7 +1837,7 @@ ieee80211_node_table_cleanup(struct ieee80211_node_table *nt) printf("%s: %s[%u] still active\n", __func__, nt->nt_name, i); #endif - FREE(nt->nt_keyixmap, M_80211_NODE); + free(nt->nt_keyixmap, M_80211_NODE); nt->nt_keyixmap = NULL; } IEEE80211_NODE_ITERATE_LOCK_DESTROY(nt); diff --git a/sys/net80211/ieee80211_power.c b/sys/net80211/ieee80211_power.c index 2a7dda8..debbd42 100644 --- a/sys/net80211/ieee80211_power.c +++ b/sys/net80211/ieee80211_power.c @@ -80,7 +80,7 @@ ieee80211_power_latevattach(struct ieee80211vap *vap) */ if (vap->iv_opmode == IEEE80211_M_HOSTAP) { vap->iv_tim_len = howmany(vap->iv_max_aid,8) * sizeof(uint8_t); - MALLOC(vap->iv_tim_bitmap, uint8_t *, vap->iv_tim_len, + vap->iv_tim_bitmap = malloc(vap->iv_tim_len, M_80211_POWER, M_NOWAIT | M_ZERO); if (vap->iv_tim_bitmap == NULL) { printf("%s: no memory for TIM bitmap!\n", __func__); @@ -94,7 +94,7 @@ void ieee80211_power_vdetach(struct ieee80211vap *vap) { if (vap->iv_tim_bitmap != NULL) { - FREE(vap->iv_tim_bitmap, M_80211_POWER); + free(vap->iv_tim_bitmap, M_80211_POWER); vap->iv_tim_bitmap = NULL; } } diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index 452bd3f..31b68fd 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -214,7 +214,7 @@ ieee80211_proto_vdetach(struct ieee80211vap *vap) { #define FREEAPPIE(ie) do { \ if (ie != NULL) \ - FREE(ie, M_80211_NODE_IE); \ + free(ie, M_80211_NODE_IE); \ } while (0) /* * Detach operating mode module. diff --git a/sys/net80211/ieee80211_scan.c b/sys/net80211/ieee80211_scan.c index dabb404..7fe649b 100644 --- a/sys/net80211/ieee80211_scan.c +++ b/sys/net80211/ieee80211_scan.c @@ -96,7 +96,7 @@ ieee80211_scan_attach(struct ieee80211com *ic) { struct scan_state *ss; - MALLOC(ss, struct scan_state *, sizeof(struct scan_state), + ss = malloc(sizeof(struct scan_state), M_80211_SCAN, M_NOWAIT | M_ZERO); if (ss == NULL) { ic->ic_scan = NULL; @@ -122,7 +122,7 @@ ieee80211_scan_detach(struct ieee80211com *ic) } ic->ic_flags &= ~IEEE80211_F_SCAN; ic->ic_scan = NULL; - FREE(SCAN_PRIVATE(ss), M_80211_SCAN); + free(SCAN_PRIVATE(ss), M_80211_SCAN); } } diff --git a/sys/net80211/ieee80211_scan_sta.c b/sys/net80211/ieee80211_scan_sta.c index 6b5bf88..1da40f6 100644 --- a/sys/net80211/ieee80211_scan_sta.c +++ b/sys/net80211/ieee80211_scan_sta.c @@ -138,7 +138,7 @@ sta_attach(struct ieee80211_scan_state *ss) { struct sta_table *st; - MALLOC(st, struct sta_table *, sizeof(struct sta_table), + st = malloc(sizeof(struct sta_table), M_80211_SCAN, M_NOWAIT | M_ZERO); if (st == NULL) return 0; @@ -162,7 +162,7 @@ sta_detach(struct ieee80211_scan_state *ss) sta_flush_table(st); mtx_destroy(&st->st_lock); mtx_destroy(&st->st_scanlock); - FREE(st, M_80211_SCAN); + free(st, M_80211_SCAN); KASSERT(nrefs > 0, ("imbalanced attach/detach")); nrefs--; /* NB: we assume caller locking */ } @@ -196,7 +196,7 @@ sta_flush_table(struct sta_table *st) TAILQ_REMOVE(&st->st_entry, se, se_list); LIST_REMOVE(se, se_hash); ieee80211_ies_cleanup(&se->base.se_ies); - FREE(se, M_80211_SCAN); + free(se, M_80211_SCAN); } memset(st->st_maxrssi, 0, sizeof(st->st_maxrssi)); } @@ -229,7 +229,7 @@ sta_add(struct ieee80211_scan_state *ss, LIST_FOREACH(se, &st->st_hash[hash], se_hash) if (IEEE80211_ADDR_EQ(se->base.se_macaddr, macaddr)) goto found; - MALLOC(se, struct sta_entry *, sizeof(struct sta_entry), + se = malloc(sizeof(struct sta_entry), M_80211_SCAN, M_NOWAIT | M_ZERO); if (se == NULL) { mtx_unlock(&st->st_lock); @@ -1439,7 +1439,7 @@ adhoc_age(struct ieee80211_scan_state *ss) TAILQ_REMOVE(&st->st_entry, se, se_list); LIST_REMOVE(se, se_hash); ieee80211_ies_cleanup(&se->base.se_ies); - FREE(se, M_80211_SCAN); + free(se, M_80211_SCAN); } } mtx_unlock(&st->st_lock); diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index c50fa53..c00af2b 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -1013,7 +1013,7 @@ sta_auth_shared(struct ieee80211_node *ni, struct ieee80211_frame *wh, switch (seq) { case IEEE80211_AUTH_SHARED_PASS: if (ni->ni_challenge != NULL) { - FREE(ni->ni_challenge, M_80211_NODE); + free(ni->ni_challenge, M_80211_NODE); ni->ni_challenge = NULL; } if (status != 0) { -- cgit v1.1