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

Commit ea6ff112 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller
Browse files

net: nb8800: Fix SKB leak in nb8800_receive()



In case nb8800_receive() fails to allocate a fragment, we would leak the
SKB freshly allocated and just return, instead, free it.

Reported-by: coverity (CID 1341750)
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Acked-by: default avatarMans Rullgard <mans@mansr.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent de702da7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -259,6 +259,7 @@ static void nb8800_receive(struct net_device *dev, unsigned int i,
		if (err) {
			netdev_err(dev, "rx buffer allocation failed\n");
			dev->stats.rx_dropped++;
			dev_kfree_skb(skb);
			return;
		}