Skip to contentSkip to conversation

Fix: memleak in liblttng-ctl visit_node_load()

PATCH David Goulet 1 participant 1 message Jun 14, 2013 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Merged!

Mathieu Desnoyers:

Quoted 15 lines

---

src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c +1 -0
index 785c113..762d604 100644
@@ -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;