From: Jonathan Rajotte Date: Mon, 12 Dec 2016 21:39:17 +0000 (-0500) Subject: Fix: free previous instance of url (alloc_url) on default live url assignation X-Git-Tag: v2.9.1~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9c41c75aca0fb289b014e9f2d2466ce622520673;p=lttng-tools.git Fix: free previous instance of url (alloc_url) on default live url assignation Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/create.c b/src/bin/lttng/commands/create.c index 0f7d1a438..40d2a77d9 100644 --- a/src/bin/lttng/commands/create.c +++ b/src/bin/lttng/commands/create.c @@ -342,6 +342,10 @@ static int create_session(void) /* Use default live URL if NO url is/are found. */ if ((opt_live_timer && !opt_url) && (opt_live_timer && !opt_data_url)) { + /* Override the url */ + free(url); + url = NULL; + ret = asprintf(&alloc_url, "net://127.0.0.1"); if (ret < 0) { PERROR("asprintf default live URL");