wtap should check if ieee80211_vap_setup fails.
* If ieee80211_vap_setup fails, we free allocated M_80211_VAP memory and return NULL; Approved by: adrian (mentor)
This commit is contained in:
parent
3c6b71699a
commit
263bbda93d
@ -334,6 +334,10 @@ wtap_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
|
||||
vap = (struct ieee80211vap *) avp;
|
||||
error = ieee80211_vap_setup(ic, vap, name, unit, IEEE80211_M_MBSS,
|
||||
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac);
|
||||
if (error) {
|
||||
free((struct wtap_vap*) vap, M_80211_VAP);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* override various methods */
|
||||
avp->av_recv_mgmt = vap->iv_recv_mgmt;
|
||||
|
Loading…
Reference in New Issue
Block a user