Fix: possible invalid free in kernel thread
authorDavid Goulet <dgoulet@efficios.com>
Tue, 18 Dec 2012 19:50:51 +0000 (14:50 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 18 Dec 2012 19:50:51 +0000 (14:50 -0500)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/main.c

index 6f8f1486ca60de5d958352868b9912ddcbdcf24f..6e548f3c10bf8185c13ac8156f1b5c54fe0ff4ce 100644 (file)
@@ -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;
        }
This page took 0.027845 seconds and 5 git commands to generate.