Fix: free previous instance of url (alloc_url) on default live url assignation
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 12 Dec 2016 21:39:17 +0000 (16:39 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Dec 2016 12:39:00 +0000 (07:39 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/create.c

index 3379a3b27b8638a3f3455af6cc4b0dca981a90b5..1603c30030c700eb2d88109264a81ee25cbc9a9c 100644 (file)
@@ -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");
This page took 0.025511 seconds and 4 git commands to generate.