Avoid doubly allocating whd thread stack

Don't malloc during wifi initialization, as that could cause double allocation in some cases.
The thread stack will be allocated by cy_rtos_thread_start if necessary.
pull/11542/head
Kyle Kearney 2019-09-19 11:05:05 -07:00
parent 83fca603f0
commit d067952b6f
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ cy_rslt_t cybsp_wifi_init_primary(whd_interface_t* interface)
{
whd_init_config_t whd_init_config;
whd_init_config.thread_stack_size = (uint32_t)THREAD_STACK_SIZE;
whd_init_config.thread_stack_start = (uint8_t *)malloc(THREAD_STACK_SIZE);
whd_init_config.thread_stack_start = NULL;
whd_init_config.thread_priority = (uint32_t)THREAD_PRIORITY;
whd_init_config.country = COUNTRY;