From 84811b9b3552a24a5f12871f94b60b9b4c48d8f5 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Mon, 12 Dec 2016 16:39:17 -0500 Subject: [PATCH] Fix: free previous instance of url (alloc_url) on default live url assignation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- src/bin/lttng/commands/create.c | 4 ++++ 1 file changed, 4 insertions(+) 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"); -- 2.34.1