Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] orinoco: possible null pointer dereference in orinoco_rx_monitor()

If the skb allocation fails, the current error path calls
dev_kfree_skb_irq() with a NULL argument. Also, 'err' is not being used.

Coverity CID: 275.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Florin Malita and committed by
Linus Torvalds
bb6e093d 30d6b2f3

+1 -3
+1 -3
drivers/net/wireless/orinoco.c
··· 812 812 if (datalen > IEEE80211_DATA_LEN + 12) { 813 813 printk(KERN_DEBUG "%s: oversized monitor frame, " 814 814 "data length = %d\n", dev->name, datalen); 815 - err = -EIO; 816 815 stats->rx_length_errors++; 817 816 goto update_stats; 818 817 } ··· 820 821 if (!skb) { 821 822 printk(KERN_WARNING "%s: Cannot allocate skb for monitor frame\n", 822 823 dev->name); 823 - err = -ENOMEM; 824 - goto drop; 824 + goto update_stats; 825 825 } 826 826 827 827 /* Copy the 802.11 header to the skb */