wireless: make regdom passing semantics simpler
The regdom struct is given to the core, so it might as well free it in error conditions. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Цей коміт міститься в:

зафіксовано
John W. Linville

джерело
7dddaf1a36
коміт
d2372b3152
@@ -1935,12 +1935,9 @@ static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info)
|
||||
mutex_lock(&cfg80211_drv_mutex);
|
||||
r = set_regdom(rd);
|
||||
mutex_unlock(&cfg80211_drv_mutex);
|
||||
if (r)
|
||||
goto bad_reg;
|
||||
|
||||
return r;
|
||||
|
||||
bad_reg:
|
||||
bad_reg:
|
||||
kfree(rd);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Посилання в новій задачі
Заблокувати користувача