Don't unref node in ieee80211_input() if it wasn't referenced
authorproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Thu, 30 Jul 2009 17:17:02 +0000 (17:17 +0000)
committerproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Thu, 30 Jul 2009 17:17:02 +0000 (17:17 +0000)
Thanks to:
Daniel Wu <danwu@ucdavis.edu>
"Ilya A. Volynets-Evenbakh" <ilya@total-knowledge.com>

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4080 0192ed92-7a03-0410-a25b-9323aeb14dbd

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) {