From: David Goulet Date: Tue, 18 Dec 2012 19:50:51 +0000 (-0500) Subject: Fix: possible invalid free in kernel thread X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=d5d63bf12b65741e64735103b0a36a0ebb52b09b Fix: possible invalid free in kernel thread Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 6f8f1486c..6e548f3c1 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -691,6 +691,12 @@ static void *thread_manage_kernel(void *data) DBG("[thread] Thread manage kernel started"); + /* + * This first step of the while is to clean this structure which could free + * non NULL pointers so zero it before the loop. + */ + memset(&events, 0, sizeof(events)); + if (testpoint(thread_manage_kernel)) { goto error_testpoint; }