summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/wlan
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2013-06-30 05:10:33 +0000
committerrpaulo <rpaulo@FreeBSD.org>2013-06-30 05:10:33 +0000
commit6b85443c9fe28d9057f94044a2ef66408625279c (patch)
treec0be4c7aebad709d2d41c1cc85fcfa389851e9b2 /sys/dev/usb/wlan
parent35a5efef3232c53875ea9794a1870d383685f081 (diff)
downloadFreeBSD-src-6b85443c9fe28d9057f94044a2ef66408625279c.zip
FreeBSD-src-6b85443c9fe28d9057f94044a2ef66408625279c.tar.gz
Fix a reference count bug in urtwn_ra_init().
Diffstat (limited to 'sys/dev/usb/wlan')
-rw-r--r--sys/dev/usb/wlan/if_urtwn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/usb/wlan/if_urtwn.c b/sys/dev/usb/wlan/if_urtwn.c
index 180dbe2..4b27be0 100644
--- a/sys/dev/usb/wlan/if_urtwn.c
+++ b/sys/dev/usb/wlan/if_urtwn.c
@@ -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);
}
OpenPOWER on IntegriCloud