sys/dev/wtap: Check return value from malloc(..., M_NOWAIT) and
drop unneeded cast. MFC after: 3 days
This commit is contained in:
parent
6e6f139f4e
commit
7399852017
@ -373,7 +373,7 @@ wtap_vap_delete(struct ieee80211vap *vap)
|
||||
destroy_dev(avp->av_dev);
|
||||
callout_stop(&avp->av_swba);
|
||||
ieee80211_vap_detach(vap);
|
||||
free((struct wtap_vap*) vap, M_80211_VAP);
|
||||
free(avp, M_80211_VAP);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -602,6 +602,8 @@ wtap_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN])
|
||||
|
||||
ni = malloc(sizeof(struct ieee80211_node), M_80211_NODE,
|
||||
M_NOWAIT|M_ZERO);
|
||||
if (ni == NULL)
|
||||
return (NULL);
|
||||
|
||||
ni->ni_txrate = 130;
|
||||
return ni;
|
||||
|
Loading…
Reference in New Issue
Block a user