From: Steven Rostedt <rostedt@goodmis.org>
To: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH] libtracefs: Fix bug in tracefs_instances()
Date: Wed, 7 Jul 2021 09:47:30 -0400 [thread overview]
Message-ID: <20210707094730.7781eea9@oasis.local.home> (raw)
In-Reply-To: <20210707130523.67268-1-y.karadz@gmail.com>
On Wed, 7 Jul 2021 16:05:23 +0300
"Yordan Karadzhov (VMware)" <y.karadz@gmail.com> wrote:
> The empty string is now made of two elements, because of the hidden
> first element that stores its size.
>
> Fixes: 056a177 (libtracefs: Restructure how string lists work)
> Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
> ---
> src/tracefs-instance.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/tracefs-instance.c b/src/tracefs-instance.c
> index 11fb580..d601db2 100644
> --- a/src/tracefs-instance.c
> +++ b/src/tracefs-instance.c
> @@ -694,7 +694,7 @@ char **tracefs_instances(const char *regex)
> } else {
> /* No matches should produce an empty list */
> if (!list.list)
> - list.list = calloc(1, sizeof(*list.list));
> + list.list = trace_list_create_empty();
> }
> return list.list;
> }
Thanks! I guess I missed one :-p
-- Steve
prev parent reply other threads:[~2021-07-07 13:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-07 13:05 [PATCH] libtracefs: Fix bug in tracefs_instances() Yordan Karadzhov (VMware)
2021-07-07 13:47 ` Steven Rostedt [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=20210707094730.7781eea9@oasis.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=y.karadz@gmail.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;
as well as URLs for NNTP newsgroup(s).