diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2016-07-16 01:41:16 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-17 07:06:00 +0200 |
commit | ea6ff112b095dce2060c304195904d859c3e2625 (patch) | |
tree | 85f63a6948c2cea5bdea6e4ac69dc0df05758bb4 /drivers/net/ethernet/aurora | |
parent | et131x: Fix logical vs bitwise check in et131x_tx_timeout() (diff) | |
download | linux-ea6ff112b095dce2060c304195904d859c3e2625.tar.xz linux-ea6ff112b095dce2060c304195904d859c3e2625.zip |
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: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aurora')
-rw-r--r-- | drivers/net/ethernet/aurora/nb8800.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c index 08a23e6b60e9..1a3555d03a96 100644 --- a/drivers/net/ethernet/aurora/nb8800.c +++ b/drivers/net/ethernet/aurora/nb8800.c @@ -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; } |