From 1f0a845dc223e765b4f42fd5064ff1da6a0c203e Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Mon, 27 Aug 2018 16:28:26 -0400 Subject: [PATCH] Fix: memory leak in userspace probe param parsing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Found by Coverity: CID 1395217: (RESOURCE_LEAK) Variable "real_target_path" going out of scope leaks the storage it points to. Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- src/bin/lttng/commands/enable_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c index d973c5f6e..48fa614bd 100644 --- a/src/bin/lttng/commands/enable_events.c +++ b/src/bin/lttng/commands/enable_events.c @@ -468,7 +468,7 @@ static int parse_userspace_probe_opts(struct lttng_event *ev, char *opt) break; default: ret = CMD_ERROR; - goto end_string; + goto end_free_path; } switch (ev->type) { -- 2.34.1