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/27 10:00:28 UTC
[incubator-nuttx] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 666d718 xtensa/esp32: Fix crash issue caused by null pointer operation
666d718 is described below
commit 666d718302d8eb8e1895811d945839da16189f59
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 c7e9860..44b014c 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)
{