[lttng-dev] [PATCH babeltrace] Fix: Undefined behavior of double free on strlist in get_names_args

Christian Babeux christian.babeux at efficios.com
Thu Feb 28 15:51:48 EST 2013


Signed-off-by: Christian Babeux <christian.babeux at efficios.com>
---
 converter/babeltrace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/converter/babeltrace.c b/converter/babeltrace.c
index 20ded00..28c63cb 100644
--- a/converter/babeltrace.c
+++ b/converter/babeltrace.c
@@ -205,6 +205,7 @@ static int get_names_args(poptContext *pc)
 		} else {
 			fprintf(stderr, "[error] unknown field name type %s\n", str);
 			free(strlist);
+			strlist = NULL;
 			ret = -EINVAL;
 			goto end;
 		}
-- 
1.8.1.3




More information about the lttng-dev mailing list