From: Christian Babeux Date: Tue, 23 Oct 2012 19:36:17 +0000 (-0400) Subject: Fix: Possible memory leaks when creating filter IR root node X-Git-Tag: v2.1.0-rc6~25 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7d8868f9bc6ea9cd7c625f63f4f7b24808aa79d0;p=lttng-tools.git Fix: Possible memory leaks when creating filter IR root node Acked-by: Mathieu Desnoyers Signed-off-by: Christian Babeux Signed-off-by: David Goulet --- diff --git a/src/lib/lttng-ctl/filter/filter-visitor-generate-ir.c b/src/lib/lttng-ctl/filter/filter-visitor-generate-ir.c index eec78fcae..84122c904 100644 --- a/src/lib/lttng-ctl/filter/filter-visitor-generate-ir.c +++ b/src/lib/lttng-ctl/filter/filter-visitor-generate-ir.c @@ -46,9 +46,11 @@ struct ir_op *make_op_root(struct ir_op *child, enum ir_side side) case IR_DATA_UNKNOWN: default: fprintf(stderr, "[error] Unknown root child data type\n"); + free(op); return NULL; case IR_DATA_STRING: fprintf(stderr, "[error] String cannot be root data type\n"); + free(op); return NULL; case IR_DATA_NUMERIC: case IR_DATA_FIELD_REF: