Fix possible use of uninitialized variables in sys_arch.c
This commit is contained in:
@@ -218,7 +218,7 @@ sys_thread_t sys_thread_new(const char *name, lwip_thread_fn function, void *arg
|
|||||||
sys_thread_t task;
|
sys_thread_t task;
|
||||||
k_stack_t *task_stack;
|
k_stack_t *task_stack;
|
||||||
|
|
||||||
task = tos_mmheap_alloc(sizeof(k_task_t));
|
task = tos_mmheap_calloc(1, sizeof(k_task_t));
|
||||||
if (!task) {
|
if (!task) {
|
||||||
printf("[sys_arch]:memalloc k_task_t fail!\n");
|
printf("[sys_arch]:memalloc k_task_t fail!\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user