diff options
Diffstat (limited to 'sys/dev/usb/wlan/if_upgt.c')
-rw-r--r-- | sys/dev/usb/wlan/if_upgt.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c index eff7922..3ea3cc1 100644 --- a/sys/dev/usb/wlan/if_upgt.c +++ b/sys/dev/usb/wlan/if_upgt.c @@ -1040,8 +1040,13 @@ upgt_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, return NULL; vap = &uvp->vap; /* enable s/w bmiss handling for sta mode */ - ieee80211_vap_setup(ic, vap, name, unit, opmode, - flags | IEEE80211_CLONE_NOBEACONS, bssid, mac); + + if (ieee80211_vap_setup(ic, vap, name, unit, opmode, + flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) { + /* out of memory */ + free(uvp, M_80211_VAP); + return (NULL); + } /* override state transition machine */ uvp->newstate = vap->iv_newstate; |