Date: Mon, 5 Mar 2018 08:01:09 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330454 - stable/11/sys/dev/iwm Message-ID: <201803050801.w2581979002580@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Mon Mar 5 08:01:08 2018 New Revision: 330454 URL: https://svnweb.freebsd.org/changeset/base/330454 Log: MFC r313306: [iwm] free node reference if rxparams addition fails. Modified: stable/11/sys/dev/iwm/if_iwm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwm/if_iwm.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm.c Mon Mar 5 08:00:17 2018 (r330453) +++ stable/11/sys/dev/iwm/if_iwm.c Mon Mar 5 08:01:08 2018 (r330454) @@ -3261,8 +3261,11 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf * /* 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; @@ -3309,7 +3312,8 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf * return TRUE; -fail: counter_u64_add(ic->ic_ierrors, 1); +fail: + counter_u64_add(ic->ic_ierrors, 1); return FALSE; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803050801.w2581979002580>