|
@@ -3108,6 +3108,7 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
|
|
{
|
|
|
struct hwsim_new_radio_params param = { 0 };
|
|
|
const char *hwname = NULL;
|
|
|
+ int ret;
|
|
|
|
|
|
param.reg_strict = info->attrs[HWSIM_ATTR_REG_STRICT_REG];
|
|
|
param.p2p_device = info->attrs[HWSIM_ATTR_SUPPORT_P2P_DEVICE];
|
|
@@ -3147,7 +3148,9 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
|
|
param.regd = hwsim_world_regdom_custom[idx];
|
|
|
}
|
|
|
|
|
|
- return mac80211_hwsim_new_radio(info, ¶m);
|
|
|
+ ret = mac80211_hwsim_new_radio(info, ¶m);
|
|
|
+ kfree(hwname);
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)
|