From d6e2830f62aa8a8b2320d33246b135d6e851c7b1 Mon Sep 17 00:00:00 2001 From: tluio <495069731@qq.com> Date: Sun, 19 Apr 2020 18:05:10 +0800 Subject: [PATCH] Fix possible use of uninitialized variables in sys_arch.c --- net/lwip/port/src/sys_arch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/lwip/port/src/sys_arch.c b/net/lwip/port/src/sys_arch.c index e80198c9..31b65df7 100644 --- a/net/lwip/port/src/sys_arch.c +++ b/net/lwip/port/src/sys_arch.c @@ -218,7 +218,7 @@ sys_thread_t sys_thread_new(const char *name, lwip_thread_fn function, void *arg sys_thread_t task; k_stack_t *task_stack; - task = tos_mmheap_alloc(sizeof(k_task_t)); + task = tos_mmheap_calloc(1, sizeof(k_task_t)); if (!task) { printf("[sys_arch]:memalloc k_task_t fail!\n"); return NULL;