@@ -1957,17 +1957,16 @@ static void do_one_broadcast(struct sock *sk,
}
sock_hold(sk);
- if (p->skb2 == NULL) {
- if (skb_shared(p->skb)) {
- p->skb2 = skb_clone(p->skb, p->allocation);
- } else {
- p->skb2 = skb_get(p->skb);
- /*
- * skb ownership may have been set when
- * delivered to a previous socket.
- */
- skb_orphan(p->skb2);
- }
+ if (p->skb2 == NULL || skb_shared(p->skb2)) {
+ kfree_skb(p->skb2);
+ p->skb2 = skb_clone(p->skb, p->allocation);
+ } else {
+ skb_get(p->skb2);
+ /*
+ * skb ownership may have been set when
+ * delivered to a previous socket.
+ */
+ skb_orphan(p->skb2);
}
if (p->skb2 == NULL) {
netlink_overrun(sk);
@@ -1997,7 +1996,6 @@ static void do_one_broadcast(struct sock *sk,
} else {
p->congested |= val;
p->delivered = 1;
- p->skb2 = NULL;
}
out:
sock_put(sk);