You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2021/04/29 09:00:54 UTC
[incubator-nuttx] branch releases/10.1 updated: xtensa/esp32: Fix
crash issue caused by null pointer operation
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch releases/10.1
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/releases/10.1 by this push:
new 84438c6 xtensa/esp32: Fix crash issue caused by null pointer operation
84438c6 is described below
commit 84438c62f7dfa85303a4d5081a691a3c44118e3a
Author: chenwen <ch...@espressif.com>
AuthorDate: Tue Apr 27 16:56:18 2021 +0800
xtensa/esp32: Fix crash issue caused by null pointer operation
---
arch/xtensa/src/esp32/esp32_wifi_adapter.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/xtensa/src/esp32/esp32_wifi_adapter.c b/arch/xtensa/src/esp32/esp32_wifi_adapter.c
index a1b8e7f..d6ff2e3 100644
--- a/arch/xtensa/src/esp32/esp32_wifi_adapter.c
+++ b/arch/xtensa/src/esp32/esp32_wifi_adapter.c
@@ -1802,8 +1802,10 @@ static int32_t esp_task_create_pinned_to_core(void *entry,
(char * const *)param);
if (pid > 0)
{
- *((int *)task_handle) = pid;
-
+ if (task_handle != NULL)
+ {
+ *((int *)task_handle) = pid;
+ }
#ifdef CONFIG_SMP
if (core_id < CONFIG_SMP_NCPUS)
{