[iwm] free node reference if rxparams addition fails.

This commit is contained in:
Adrian Chadd 2017-02-06 01:57:41 +00:00
parent 9ad221a558
commit e8bb2e7961

View File

@ -2994,8 +2994,11 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc,
/* rssi is in 1/2db units */
rxs.c_rssi = rssi * 2;
rxs.c_nf = sc->sc_noise;
if (ieee80211_add_rx_params(m, &rxs) == 0)
if (ieee80211_add_rx_params(m, &rxs) == 0) {
if (ni)
ieee80211_free_node(ni);
goto fail;
}
if (ieee80211_radiotap_active_vap(vap)) {
struct iwm_rx_radiotap_header *tap = &sc->sc_rxtap;
@ -3042,7 +3045,8 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc,
return;
fail: counter_u64_add(ic->ic_ierrors, 1);
fail:
counter_u64_add(ic->ic_ierrors, 1);
}
static int