qcacld-3.0: Allocate/Free skb in same function

The skb used for HW-mode-change vendor event will be freed twice
in failure scenario.
To avoid this, just keep the free in same function as allocation.

CRs-Fixed: 2274784
Change-Id: Ibd37bc9787470da6de93c87a16c4c3bed7d1f78e
This commit is contained in:
Lin Bai 2018-07-09 10:19:06 +08:00 • committed by nshrivas
commit 5dc5495d9a

View file

@ -13935,7 +13935,6 @@ static int wlan_hdd_fill_intf_info(struct sk_buff *skb,
return 0;
error:
hdd_err("Fill buffer with interface info failed");
kfree_skb(skb);
return -EINVAL;
}
@ -13999,7 +13998,6 @@ static int wlan_hdd_fill_mac_info(struct sk_buff *skb,
return 0;
error:
hdd_err("Fill buffer with mac info failed");
kfree_skb(skb);
return -EINVAL;
}