ESP_WIFI: Remove static analysis warnings

This commit is contained in:
Kapil Gupta
2021-11-10 11:48:00 +05:30
parent 9ee974e626
commit d3542495ab
24 changed files with 224 additions and 262 deletions

View File

@@ -552,17 +552,20 @@ void wpa_bss_tmp_disallow(struct wpa_supplicant *wpa_s, const u8 *bssid,
}
bss = os_malloc(sizeof(*bss));
if (!bss) {
wpa_printf(MSG_DEBUG,
"Failed to allocate memory for temp disallow BSS");
return;
}
esp_timer_create_args_t blacklist_timer_create = {
.callback = &wpa_bss_tmp_disallow_timeout,
.arg = bss,
.dispatch_method = ESP_TIMER_TASK,
.name = "blacklist_timeout_timer"
};
esp_timer_create(&blacklist_timer_create, &(bss->blacklist_timer));
if (!bss) {
wpa_printf(MSG_DEBUG,
"Failed to allocate memory for temp disallow BSS");
if (esp_timer_create(&blacklist_timer_create, &(bss->blacklist_timer)) != ESP_OK) {
os_free(bss);
return;
}