Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] [PATCH lttng-tools] Fix: Possible memory leaks when creating filter IR root node
@ 2012-10-23 19:36 Christian Babeux
  2012-10-23 19:57 ` Mathieu Desnoyers
  2012-10-25 19:56 ` David Goulet
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Babeux @ 2012-10-23 19:36 UTC (permalink / raw)



Signed-off-by: Christian Babeux <christian.babeux at efficios.com>
---
 src/lib/lttng-ctl/filter/filter-visitor-generate-ir.c | 2 ++
 1 file changed, 2 insertions(+)

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 eec78fc..84122c9 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:
-- 
1.7.12.2




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-25 19:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-23 19:36 [lttng-dev] [PATCH lttng-tools] Fix: Possible memory leaks when creating filter IR root node Christian Babeux
2012-10-23 19:57 ` Mathieu Desnoyers
2012-10-25 19:56 ` David Goulet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox