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.10.0-rc1~82 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=84811b9b3552a24a5f12871f94b60b9b4c48d8f5 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");