Fix: free previous instance of url (alloc_url) on default live url assignation
[lttng-tools.git] / 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.026688 seconds and 5 git commands to generate.