Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8440853b authored by YOSHIFUJI Hideaki / 吉藤英明's avatar YOSHIFUJI Hideaki / 吉藤英明 Committed by David S. Miller
Browse files

bridge br_multicast: Fix skb leakage in error path.

parent 0ba8c9ec
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -991,7 +991,7 @@ static int br_multicast_ipv4_rcv(struct net_bridge *br,

		err = pskb_trim_rcsum(skb2, len);
		if (err)
			return err;
			goto err_out;
	}

	len -= ip_hdrlen(skb2);
@@ -1013,7 +1013,7 @@ static int br_multicast_ipv4_rcv(struct net_bridge *br,
	case CHECKSUM_NONE:
		skb2->csum = 0;
		if (skb_checksum_complete(skb2))
			return -EINVAL;
			goto out;
	}

	err = 0;
@@ -1040,6 +1040,7 @@ static int br_multicast_ipv4_rcv(struct net_bridge *br,

out:
	__skb_push(skb2, offset);
err_out:
	if (skb2 != skb)
		kfree_skb(skb2);
	return err;