Author: monthadar Date: Tue Dec 18 08:44:59 2012 New Revision: 244389 URL: http://svnweb.freebsd.org/changeset/base/244389
Log: 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) Modified: head/sys/dev/wtap/if_wtap.c Modified: head/sys/dev/wtap/if_wtap.c ============================================================================== --- head/sys/dev/wtap/if_wtap.c Tue Dec 18 08:41:23 2012 (r244388) +++ head/sys/dev/wtap/if_wtap.c Tue Dec 18 08:44:59 2012 (r244389) @@ -334,6 +334,10 @@ wtap_vap_create(struct ieee80211com *ic, 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; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"