Add null check around dev_kfree_skb
authormtaylor <mtaylor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 21 Nov 2007 08:23:43 +0000 (08:23 +0000)
committermtaylor <mtaylor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 21 Nov 2007 08:23:43 +0000 (08:23 +0000)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2875 0192ed92-7a03-0410-a25b-9323aeb14dbd

regression/wep/test_wep.c

index 787fa9358b74c588c4fb78a1330e6d85dbd4a64d..ae95eadc8b6f0cdd2051ea55930a21328e6a3347 100644 (file)
@@ -269,7 +269,8 @@ runtest(struct ieee80211com *ic, struct ciphertest *t)
                dumpdata("Plaintext", t->plaintext, t->plaintext_len);
                goto bad;
        }
-       dev_kfree_skb(skb);
+       if (skb != NULL)
+               dev_kfree_skb(skb);
        ieee80211_crypto_delkey(ic, &key);
        printk("PASS\n");
        return 1;