* [PATCH lttng-tools] Fix: free previous instance of url (alloc_url) on default live url assignation
@ 2016-12-12 21:16 Jonathan Rajotte
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Rajotte @ 2016-12-12 21:16 UTC (permalink / raw)
To: lttng-dev; +Cc: jgalar
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
---
src/bin/lttng/commands/create.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/bin/lttng/commands/create.c b/src/bin/lttng/commands/create.c
index 0f7d1a4..e6f15c7 100644
--- a/src/bin/lttng/commands/create.c
+++ b/src/bin/lttng/commands/create.c
@@ -342,6 +342,12 @@ 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 */
+ if (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
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH lttng-tools] Fix: free previous instance of url (alloc_url) on default live url assignation
[not found] ` <CAB4xu_3L7EqLUWOv-nSyvnse3SPpZsZMG6x59=ZJEnxMp8SzsA@mail.gmail.com>
@ 2016-12-12 21:36 ` Jonathan Rajotte Julien
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Rajotte Julien @ 2016-12-12 21:36 UTC (permalink / raw)
To: Philippe Proulx; +Cc: lttng-dev, Jeremie Galarneau
On 2016-12-12 04:24 PM, Philippe Proulx wrote:
> On Mon, Dec 12, 2016 at 4:16 PM, Jonathan Rajotte
> <jonathan.rajotte-julien@efficios.com> wrote:
>> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
>> ---
>> src/bin/lttng/commands/create.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/src/bin/lttng/commands/create.c b/src/bin/lttng/commands/create.c
>> index 0f7d1a4..e6f15c7 100644
>> --- a/src/bin/lttng/commands/create.c
>> +++ b/src/bin/lttng/commands/create.c
>> @@ -342,6 +342,12 @@ 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 */
>> + if (url) {
>> + free(url);
>> + url = NULL;
>> + }
> Just:
Sire, you are quite right.
>
> + free(url);
> + url = NULL;
>
> if the project's coding style allows.
>
> Phil
>
>> +
>> ret = asprintf(&alloc_url, "net://127.0.0.1");
>> if (ret < 0) {
>> PERROR("asprintf default live URL");
>> --
>> 2.7.4
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Jonathan R. Julien
Efficios
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH lttng-tools] Fix: free previous instance of url (alloc_url) on default live url assignation
[not found] <1481577378-1776-1-git-send-email-jonathan.rajotte-julien@efficios.com>
@ 2016-12-12 21:24 ` Philippe Proulx
[not found] ` <CAB4xu_3L7EqLUWOv-nSyvnse3SPpZsZMG6x59=ZJEnxMp8SzsA@mail.gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Proulx @ 2016-12-12 21:24 UTC (permalink / raw)
To: Jonathan Rajotte; +Cc: lttng-dev, Jeremie Galarneau
On Mon, Dec 12, 2016 at 4:16 PM, Jonathan Rajotte
<jonathan.rajotte-julien@efficios.com> wrote:
>
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
> ---
> src/bin/lttng/commands/create.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/bin/lttng/commands/create.c b/src/bin/lttng/commands/create.c
> index 0f7d1a4..e6f15c7 100644
> --- a/src/bin/lttng/commands/create.c
> +++ b/src/bin/lttng/commands/create.c
> @@ -342,6 +342,12 @@ 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 */
> + if (url) {
> + free(url);
> + url = NULL;
> + }
Just:
+ free(url);
+ url = NULL;
if the project's coding style allows.
Phil
> +
> ret = asprintf(&alloc_url, "net://127.0.0.1");
> if (ret < 0) {
> PERROR("asprintf default live URL");
> --
> 2.7.4
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-12 21:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-12 21:16 [PATCH lttng-tools] Fix: free previous instance of url (alloc_url) on default live url assignation Jonathan Rajotte
[not found] <1481577378-1776-1-git-send-email-jonathan.rajotte-julien@efficios.com>
2016-12-12 21:24 ` Philippe Proulx
[not found] ` <CAB4xu_3L7EqLUWOv-nSyvnse3SPpZsZMG6x59=ZJEnxMp8SzsA@mail.gmail.com>
2016-12-12 21:36 ` Jonathan Rajotte Julien
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.