|
|
@@ -946,7 +946,8 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,
|
|
|
goto nla_put_failure;
|
|
|
|
|
|
genlmsg_end(skb, msg_head);
|
|
|
- genlmsg_unicast(&init_net, skb, dst_portid);
|
|
|
+ if (genlmsg_unicast(&init_net, skb, dst_portid))
|
|
|
+ goto err_free_txskb;
|
|
|
|
|
|
/* Enqueue the packet */
|
|
|
skb_queue_tail(&data->pending, my_skb);
|
|
|
@@ -955,6 +956,8 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,
|
|
|
return;
|
|
|
|
|
|
nla_put_failure:
|
|
|
+ nlmsg_free(skb);
|
|
|
+err_free_txskb:
|
|
|
printk(KERN_DEBUG "mac80211_hwsim: error occurred in %s\n", __func__);
|
|
|
ieee80211_free_txskb(hw, my_skb);
|
|
|
data->tx_failed++;
|