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.8.4~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=16e652aa06fa51e75a8111fb7643ae3d5495437b;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 3379a3b27..1603c3003 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");