diff mbox

NULL Pointer Deference: NFS & Telnet

Message ID 27F9C60D11D683428E133F85D2BB4A53043E3EDFE6@dlee03.ent.ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Abraham Arce May 26, 2010, 1:48 a.m. UTC
None
diff mbox

Patch

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index f8abf68..eb81f76 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -334,7 +334,7 @@  static void skb_release_data(struct sk_buff *skb)
 	if (!skb->cloned ||
 	    !atomic_sub_return(skb->nohdr ? (1 << SKB_DATAREF_SHIFT) + 1 : 1,
 			       &skb_shinfo(skb)->dataref)) {
-		if (skb_shinfo(skb)->nr_frags) {
+		if (skb_shinfo(skb)->nr_frags && skb_has_frags(skb)) {
 			int i;
 			for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
 				put_page(skb_shinfo(skb)->frags[i].page);