PERFORCE change 117268 for review

Sepherosa Ziehau sephe at FreeBSD.org
Tue Apr 3 11:24:25 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=117268

Change 117268 by sephe at sephe_zealot:sam_wifi on 2007/04/03 11:24:16

	Prevent node refcnt leakage on error handling path.

Affected files ...

.. //depot/projects/wifi/sys/dev/ral/rt2560.c#16 edit
.. //depot/projects/wifi/sys/dev/ral/rt2661.c#10 edit

Differences ...

==== //depot/projects/wifi/sys/dev/ral/rt2560.c#16 (text) ====

@@ -1983,9 +1983,10 @@
 			if (bpf_peers_present(ic->ic_rawbpf))
 				bpf_mtap(ic->ic_rawbpf, m0);
 
-			if (rt2560_tx_mgt(sc, m0, ni) != 0)
+			if (rt2560_tx_mgt(sc, m0, ni) != 0) {
+				ieee80211_free_node(ni);
 				break;
-
+			}
 		} else {
 			if (ic->ic_state != IEEE80211_S_RUN)
 				break;

==== //depot/projects/wifi/sys/dev/ral/rt2661.c#10 (text) ====

@@ -1751,9 +1751,10 @@
 			if (bpf_peers_present(ic->ic_rawbpf))
 				bpf_mtap(ic->ic_rawbpf, m0);
 
-			if (rt2661_tx_mgt(sc, m0, ni) != 0)
+			if (rt2661_tx_mgt(sc, m0, ni) != 0) {
+				ieee80211_free_node(ni);
 				break;
-
+			}
 		} else {
 			if (ic->ic_state != IEEE80211_S_RUN)
 				break;
@@ -1790,6 +1791,7 @@
 				/* there is no place left in this ring */
 				IFQ_DRV_PREPEND(&ifp->if_snd, m0);
 				ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+				ieee80211_free_node(ni);
 				break;
 			}
 


More information about the p4-projects mailing list