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:35:46 +0000 (07:35 -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 0f7d1a4380646804354164565746f7a30bd90a0b..40d2a77d94b48b9d8435948c2c2b557ade3792ed 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.029475 seconds and 4 git commands to generate.