From: Francis Deslauriers Date: Mon, 27 Aug 2018 20:28:26 +0000 (-0400) Subject: Fix: memory leak in userspace probe param parsing X-Git-Tag: v2.11.0-rc1~48 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=1f0a845dc223e765b4f42fd5064ff1da6a0c203e Fix: memory leak in userspace probe param parsing 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 --- 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) {