[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH v2 1/8] lib/uksched: Initialize `stack` with `NULL` in uk_sched_thread_create()
Initialize `stack` with `NULL` in uk_sched_thread_create() to avoid potential bugs caused by uninitialized usaged in the error block (err jump label). Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx> --- lib/uksched/sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/uksched/sched.c b/lib/uksched/sched.c index bac86b3..0887b44 100644 --- a/lib/uksched/sched.c +++ b/lib/uksched/sched.c @@ -155,7 +155,7 @@ struct uk_thread *uk_sched_thread_create(struct uk_sched *sched, const char *name, void (*function)(void *), void *arg) { struct uk_thread *thread = NULL; - void *stack; + void *stack = NULL; int rc; thread = uk_malloc(sched->allocator, sizeof(struct uk_thread)); -- 2.7.4 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |