mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 10:52:50 +00:00
MFC r343682:
sys/dev/wtap: Check return value from malloc(..., M_NOWAIT) and drop unneeded cast.
This commit is contained in:
parent
67741ae5d2
commit
ffb22e4bfe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=343823
@ -371,7 +371,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);
|
||||
}
|
||||
|
||||
/* NB: This function is not used.
|
||||
@ -744,6 +744,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