wifi: Fix spin lock allocation in PSRAM bug

Closes https://github.com/espressif/esp-idf/issues/5629
This commit is contained in:
dongyou
2020-09-14 19:21:31 +08:00
parent 767235ba6d
commit 29592e3e83
2 changed files with 2 additions and 2 deletions

View File

@@ -172,7 +172,7 @@ static void set_isr_wrapper(int32_t n, void *f, void *arg)
static void * spin_lock_create_wrapper(void)
{
portMUX_TYPE tmp = portMUX_INITIALIZER_UNLOCKED;
void *mux = malloc(sizeof(portMUX_TYPE));
void *mux = heap_caps_malloc(sizeof(portMUX_TYPE), MALLOC_CAP_8BIT|MALLOC_CAP_INTERNAL);
if (mux) {
memcpy(mux,&tmp,sizeof(portMUX_TYPE));