From dcb63deb1b6337781943a7bea5bb2b04c6d76b55 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 22 Feb 2017 14:56:28 +0000 Subject: [PATCH] inputthread: Initialise inputThreadInfo->changed before use ==8734== Thread 2 InputThread: ==8734== Conditional jump or move depends on uninitialised value(s) ==8734== at 0x2FDB05: InputThreadDoWork (inputthread.c:333) ==8734== by 0x6924423: start_thread (pthread_create.c:333) ==8734== by 0x6C229BE: clone (clone.S:105) Signed-off-by: Chris Wilson Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer --- os/inputthread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os/inputthread.c b/os/inputthread.c index 8e7f2edb9..4400fba3f 100644 --- a/os/inputthread.c +++ b/os/inputthread.c @@ -403,6 +403,8 @@ InputThreadPreInit(void) if (!inputThreadInfo) FatalError("input-thread: could not allocate memory"); + inputThreadInfo->changed = FALSE; + inputThreadInfo->thread = 0; xorg_list_init(&inputThreadInfo->devs); inputThreadInfo->fds = ospoll_create();