[lttng-dev] [PATCH lttng-tools] Fix: memleak in liblttng-ctl visit_node_load()

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Fri Jun 14 16:34:56 EDT 2013


Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
diff --git a/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c b/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c
index 785c113..762d604 100644
--- a/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c
+++ b/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c
@@ -263,6 +263,7 @@ int visit_node_load(struct filter_parser_ctx *ctx, struct ir_op *node)
 			insn->op = FILTER_OP_GET_CONTEXT_REF;
 			break;
 		default:
+			free(insn);
 			return -EINVAL;
 		}
 		ref_offset.offset = (uint16_t) -1U;

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list