提交 0ae8a831 编写于 作者: L liyufan

fix nil crash

Signed-off-by: Nliyufan <liyufan5@huawei.com>
上级 8bc17e57
......@@ -4980,6 +4980,9 @@ static int nl80211_put_freq_params(struct nl_msg *msg,
static int nl80211_set_channel(struct i802_bss *bss,
struct hostapd_freq_params *freq, int set_chan)
{
if (bss == NULL || freq == NULL) {
return -1;
}
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
int ret;
......
......@@ -2461,6 +2461,9 @@ struct hostapd_hw_modes *
nl80211_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags,
u8 *dfs_domain)
{
if (priv == NULL) {
return NULL;
}
u32 feat;
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册