Commit e8bc2ebd authored by Jon Mason's avatar Jon Mason

ntb_netdev: Fix skb free issue in open

In ntb_netdev_open, when ntb_transport_rx_enqueue fails the skb that was
attempting to be enqueued is not freed.  Free this skb on the
ntb_transport_rx_enqueue error.
Signed-off-by: default avatarJon Mason <jon.mason@intel.com>
parent fea903ec
......@@ -182,8 +182,10 @@ static int ntb_netdev_open(struct net_device *ndev)
rc = ntb_transport_rx_enqueue(dev->qp, skb, skb->data,
ndev->mtu + ETH_HLEN);
if (rc == -EINVAL)
if (rc == -EINVAL) {
dev_kfree_skb(skb);
goto err;
}
}
netif_carrier_off(ndev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment