Don't unref node in ieee80211_input() if it wasn't referenced
[madwifi/.git] / net80211 / ieee80211_input.c
index 3a5ed58441f74804fb18b54272fa880f19f67ec8..e4089830a85b45fcbdb852855b738491ded23a77 100644 (file)
@@ -213,8 +213,10 @@ ieee80211_input(struct ieee80211vap *vap, struct ieee80211_node *ni_or_null,
        u_int16_t rxseq;
 
        if ((vap->iv_dev->flags & (IFF_RUNNING | IFF_UP)) !=
-                       (IFF_RUNNING | IFF_UP))
-               goto out;
+                       (IFF_RUNNING | IFF_UP)) {
+               ieee80211_dev_kfree_skb(&skb);
+               return -1;
+       }
 
        /* Initialize ni as in the previous API. */
        if (ni_or_null == NULL) {