Commit a7b488d65d39d94ae66b93cca9fc655aaa2ea1bb

Authored by Navid Emamdoost
Committed by Greg Kroah-Hartman
1 parent 5f4e6b874b

cxgb4: add missing release on skb in uld_send()

[ Upstream commit e6827d1abdc9b061a57d7b7d3019c4e99fabea2f ]

In the implementation of uld_send(), the skb is consumed on all
execution paths except one. Release skb when returning NET_XMIT_DROP.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

drivers/net/ethernet/chelsio/cxgb4/sge.c
... ... @@ -2441,6 +2441,7 @@
2441 2441 txq_info = adap->sge.uld_txq_info[tx_uld_type];
2442 2442 if (unlikely(!txq_info)) {
2443 2443 WARN_ON(true);
  2444 + kfree_skb(skb);
2444 2445 return NET_XMIT_DROP;
2445 2446 }
2446 2447