[lttng-dev] [PATCH lttng-tools] Missing NULL pointer init in tap.c

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Fri Jul 12 11:41:08 EDT 2013


Could lead to free() of unitialized pointer.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
diff --git a/tests/utils/tap/tap.c b/tests/utils/tap/tap.c
index a430951..86c89a2 100644
--- a/tests/utils/tap/tap.c
+++ b/tests/utils/tap/tap.c
@@ -294,7 +294,7 @@ int
 skip(unsigned int n, char *fmt, ...)
 {
 	va_list ap;
-	char *skip_msg;
+	char *skip_msg = NULL;
 
 	LOCK;
 
-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list