[lttng-dev] [PATCH lttng-tools v2] Fix: free previous instance of url (alloc_url) on default live url assignation

Jérémie Galarneau jeremie.galarneau at efficios.com
Fri Dec 16 12:48:09 UTC 2016


Merged in master, stable-2.9 and stable-2.8.

Thanks for the fix and thanks Phil for the review!
Jérémie

On 12 December 2016 at 16:39, Jonathan Rajotte
<jonathan.rajotte-julien at efficios.com> wrote:
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
> ---
>  src/bin/lttng/commands/create.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/bin/lttng/commands/create.c b/src/bin/lttng/commands/create.c
> index 0f7d1a4..40d2a77 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");
> --
> 2.7.4
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list