mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-27 00:11:01 +02:00
Merge branch 'feature/gcc-fanalyzer_v5.1' into 'release/v5.1'
feat(ci): add gnu static analyzer job (v5.1) See merge request espressif/esp-idf!32984
This commit is contained in:
@@ -93,6 +93,7 @@ void heap_caps_init(void)
|
|||||||
const soc_memory_type_desc_t *type = &soc_memory_types[region->type];
|
const soc_memory_type_desc_t *type = &soc_memory_types[region->type];
|
||||||
heap_t *heap = &temp_heaps[heap_idx];
|
heap_t *heap = &temp_heaps[heap_idx];
|
||||||
if (region->type == -1) {
|
if (region->type == -1) {
|
||||||
|
memset(heap, 0, sizeof(*heap));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
heap_idx++;
|
heap_idx++;
|
||||||
|
@@ -1431,8 +1431,11 @@ static dma_buffer_block_t *buffer_block_alloc(usb_transfer_type_t type)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
dma_buffer_block_t *buffer = calloc(1, sizeof(dma_buffer_block_t));
|
dma_buffer_block_t *buffer = calloc(1, sizeof(dma_buffer_block_t));
|
||||||
|
if (buffer == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
void *xfer_desc_list = heap_caps_aligned_calloc(USB_DWC_QTD_LIST_MEM_ALIGN, desc_list_len, sizeof(usb_dwc_ll_dma_qtd_t), MALLOC_CAP_DMA);
|
void *xfer_desc_list = heap_caps_aligned_calloc(USB_DWC_QTD_LIST_MEM_ALIGN, desc_list_len, sizeof(usb_dwc_ll_dma_qtd_t), MALLOC_CAP_DMA);
|
||||||
if (buffer == NULL || xfer_desc_list == NULL) {
|
if (xfer_desc_list == NULL) {
|
||||||
free(buffer);
|
free(buffer);
|
||||||
heap_caps_free(xfer_desc_list);
|
heap_caps_free(xfer_desc_list);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -332,8 +332,10 @@ esp_err_t usb_new_phy(const usb_phy_config_t *config, usb_phy_handle_t *handle_r
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
free(phy_context->iopins);
|
if (phy_context) {
|
||||||
free(phy_context);
|
free(phy_context->iopins);
|
||||||
|
free(phy_context);
|
||||||
|
}
|
||||||
if (p_phy_ctrl_obj->ref_count == 0) {
|
if (p_phy_ctrl_obj->ref_count == 0) {
|
||||||
free(p_phy_ctrl_obj);
|
free(p_phy_ctrl_obj);
|
||||||
p_phy_ctrl_obj = NULL;
|
p_phy_ctrl_obj = NULL;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -107,12 +107,16 @@ static esp_err_t event_start_select(int nfds,
|
|||||||
for (int i = 0; i < nfds; i++) {
|
for (int i = 0; i < nfds; i++) {
|
||||||
_lock_acquire_recursive(&s_events[i].lock);
|
_lock_acquire_recursive(&s_events[i].lock);
|
||||||
if (s_events[i].fd == i && (FD_ISSET(i, readfds) || FD_ISSET(i, writefds) || FD_ISSET(i, exceptfds))) {
|
if (s_events[i].fd == i && (FD_ISSET(i, readfds) || FD_ISSET(i, writefds) || FD_ISSET(i, exceptfds))) {
|
||||||
|
event_select_args_t *event_select_args =
|
||||||
|
(event_select_args_t *)malloc(sizeof(event_select_args_t));
|
||||||
|
if (!event_select_args) {
|
||||||
|
_lock_release_recursive(&s_events[i].lock);
|
||||||
|
return ESP_ERR_NO_MEM;
|
||||||
|
}
|
||||||
if (s_events[i].support_isr) {
|
if (s_events[i].support_isr) {
|
||||||
portENTER_CRITICAL(&s_events[i].data_spin_lock);
|
portENTER_CRITICAL(&s_events[i].data_spin_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
event_select_args_t *event_select_args =
|
|
||||||
(event_select_args_t *)malloc(sizeof(event_select_args_t));
|
|
||||||
event_select_args->fd = i;
|
event_select_args->fd = i;
|
||||||
event_select_args->signal_sem = signal_sem;
|
event_select_args->signal_sem = signal_sem;
|
||||||
|
|
||||||
|
@@ -433,6 +433,8 @@ int ieee802_1x_init(struct hostapd_data *hapd)
|
|||||||
|
|
||||||
os_memset(&conf, 0, sizeof(conf));
|
os_memset(&conf, 0, sizeof(conf));
|
||||||
eap_cfg = os_zalloc(sizeof(struct eap_config));
|
eap_cfg = os_zalloc(sizeof(struct eap_config));
|
||||||
|
if (!eap_cfg)
|
||||||
|
return -1;
|
||||||
eap_cfg->max_auth_rounds = 100;
|
eap_cfg->max_auth_rounds = 100;
|
||||||
eap_cfg->max_auth_rounds_short = 50;
|
eap_cfg->max_auth_rounds_short = 50;
|
||||||
//eap_cfg->backend_auth = 1;
|
//eap_cfg->backend_auth = 1;
|
||||||
|
@@ -202,6 +202,10 @@ static int ieee802_11_parse_vendor_specific(struct wpa_supplicant *wpa_s, const
|
|||||||
case SAE_PK_OUI_TYPE:
|
case SAE_PK_OUI_TYPE:
|
||||||
wpa_s->sae_pk_elems.sae_pk_len = elem->datalen - 4;
|
wpa_s->sae_pk_elems.sae_pk_len = elem->datalen - 4;
|
||||||
wpa_s->sae_pk_elems.sae_pk = (u8*)os_zalloc(sizeof(u8)*(elem->datalen-4));
|
wpa_s->sae_pk_elems.sae_pk = (u8*)os_zalloc(sizeof(u8)*(elem->datalen-4));
|
||||||
|
if (!wpa_s->sae_pk_elems.sae_pk) {
|
||||||
|
wpa_printf(MSG_EXCESSIVE, "Can not allocate memory for sae_pk");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
os_memcpy(wpa_s->sae_pk_elems.sae_pk, pos+4, elem->datalen-4);
|
os_memcpy(wpa_s->sae_pk_elems.sae_pk, pos+4, elem->datalen-4);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user