Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jun 2013 05:10:33 +0000 (UTC)
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r252401 - head/sys/dev/usb/wlan
Message-ID:  <201306300510.r5U5AXL5055126@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rpaulo
Date: Sun Jun 30 05:10:33 2013
New Revision: 252401
URL: http://svnweb.freebsd.org/changeset/base/252401

Log:
  Fix a reference count bug in urtwn_ra_init().

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwn.c	Sun Jun 30 01:20:59 2013	(r252400)
+++ head/sys/dev/usb/wlan/if_urtwn.c	Sun Jun 30 05:10:33 2013	(r252401)
@@ -1253,6 +1253,7 @@ urtwn_ra_init(struct urtwn_softc *sc)
 	cmd.mask = htole32(mode << 28 | basicrates);
 	error = urtwn_fw_cmd(sc, R92C_CMD_MACID_CONFIG, &cmd, sizeof(cmd));
 	if (error != 0) {
+		ieee80211_free_node(ni);
 		device_printf(sc->sc_dev,
 		    "could not add broadcast station\n");
 		return (error);
@@ -1267,6 +1268,7 @@ urtwn_ra_init(struct urtwn_softc *sc)
 	cmd.mask = htole32(mode << 28 | rates);
 	error = urtwn_fw_cmd(sc, R92C_CMD_MACID_CONFIG, &cmd, sizeof(cmd));
 	if (error != 0) {
+		ieee80211_free_node(ni);
 		device_printf(sc->sc_dev, "could not add BSS station\n");
 		return (error);
 	}
@@ -1277,6 +1279,8 @@ urtwn_ra_init(struct urtwn_softc *sc)
 
 	/* Indicate highest supported rate. */
 	ni->ni_txrate = rs->rs_nrates - 1;
+	ieee80211_free_node(ni);
+
 	return (0);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306300510.r5U5AXL5055126>