cxgb4: add missing release on skb in uld_send()

[ Upstream commit e6827d1abd ]

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>
This commit is contained in:
Navid Emamdoost 2020-07-22 21:58:39 -05:00 committed by Greg Kroah-Hartman
parent 5f4e6b874b
commit a7b488d65d
1 changed files with 1 additions and 0 deletions

View File

@ -2441,6 +2441,7 @@ static inline int uld_send(struct adapter *adap, struct sk_buff *skb,
txq_info = adap->sge.uld_txq_info[tx_uld_type];
if (unlikely(!txq_info)) {
WARN_ON(true);
kfree_skb(skb);
return NET_XMIT_DROP;
}