Fix: possible invalid free in kernel thread
[lttng-tools.git] / 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.023145 seconds and 4 git commands to generate.