]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
cxgb4: add missing release on skb in uld_send()
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Thu, 23 Jul 2020 02:58:39 +0000 (21:58 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Jul 2020 03:04:17 +0000 (20:04 -0700)
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>
drivers/net/ethernet/chelsio/cxgb4/sge.c

index 32a45dc51ed7966b912097a1bb83872698a686d8..92eee66cbc8459001e7017b4cdc1647e9c8ef088 100644 (file)
@@ -2938,6 +2938,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;
        }