From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] [BUG] lttng-sessiond
Date: Sat, 25 Apr 2015 15:37:25 +0000 (UTC) [thread overview]
Message-ID: <196643977.36058.1429976245491.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <9E6E6DE2-E219-4F79-9687-BE7A45910C34@mailbox.tu-dresden.de>
----- Original Message -----
> >
> > Why do you need to load those explicitly ? They should be
> > already loaded by default. I don't get those errors here.
> > Which shell are you using (sh symlink) ? Can you reproduce
> > using bash ?
> Ok. Found the bug. In append_list_to_probes() index is used to get
> the current index into the probes array. However in the loop, index
> is never incremented. Therefore, the first entry of probes is
> overwritten, but nr_probes is incremented, and later those "empty"
> entries are referenced.
>
> There is also a memory leak in append_list_to_probes():
>
> tmp_list = strdup(list); // uses malloc()
> next = strtok(tmp_list, ","); // tmp_list needs to be NULL except in the
> first iteration
> tmp_list = NULL; // so set it NULL
> free(tmp_list); // good intention, does not work.
Thanks for spotting those issues! I'm CCing the
author of this code.
Mathieu
>
> Best regards,
> Hannes
>
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
prev parent reply other threads:[~2015-04-25 15:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-23 10:04 Hannes Weisbach
2015-04-23 19:26 ` Mathieu Desnoyers
2015-04-23 20:13 ` Mathieu Desnoyers
2015-04-24 9:52 ` Hannes Weisbach
2015-04-24 18:32 ` Mathieu Desnoyers
2015-04-25 14:13 ` Hannes Weisbach
2015-04-25 14:37 ` Hannes Weisbach
2015-04-25 15:37 ` Mathieu Desnoyers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=196643977.36058.1429976245491.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox