]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv6/mcast.c
[IPV4/IPV6] multicast: Check add_grhead() return value
[net-next-2.6.git] / net / ipv6 / mcast.c
index 882cde4b404754c97089e573981eb9ce17e74d4b..e3ec216958328ff12820d9f858a6041f847a758e 100644 (file)
@@ -1582,6 +1582,8 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
                        skb = add_grhead(skb, pmc, type, &pgr);
                        first = 0;
                }
+               if (!skb)
+                       return NULL;
                psrc = (struct in6_addr *)skb_put(skb, sizeof(*psrc));
                *psrc = psf->sf_addr;
                scount++; stotal++;