Merge pull request #146 from tluio/sys_arch-patch-1

Fix possible use of uninitialized variables in sys_arch.c
This commit is contained in:
Arthur 2020-04-20 10:34:53 +08:00 committed by GitHub
commit 3b042f1d49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;