If osif_vdev_sync_op_start failed, that means operation on net_dev is not permitted. So, free the skb before return. Change-Id: Icd366c2d9d947e39f26f1b21878bfe0154a55fdc CRs-Fixed: 2681018
@@ -733,8 +733,11 @@ netdev_tx_t hdd_softap_hard_start_xmit(struct sk_buff *skb,
{
struct osif_vdev_sync *vdev_sync;
- if (osif_vdev_sync_op_start(net_dev, &vdev_sync))
+ if (osif_vdev_sync_op_start(net_dev, &vdev_sync)) {
+ hdd_debug_rl("Operation on net_dev is not permitted");
+ kfree_skb(skb);
return NETDEV_TX_OK;
+ }
__hdd_softap_hard_start_xmit(skb, net_dev);
@@ -1217,8 +1217,11 @@ netdev_tx_t hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
__hdd_hard_start_xmit(skb, net_dev);