From: Steven Rostedt <rostedt@goodmis.org>
To: Daniel Bristot de Oliveira <bristot@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH 3/8] rtla/osnoise_top: Fix segmentation fault when failing to enable -t
Date: Thu, 3 Feb 2022 11:43:03 -0500 [thread overview]
Message-ID: <20220203114303.575910f8@gandalf.local.home> (raw)
In-Reply-To: <20220203114126.3ec6b37d@gandalf.local.home>
On Thu, 3 Feb 2022 11:41:26 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
> Wouldn't these four patches be more robust if you just initialized record
> (and tool) to NULL, and change osnoise_destroy_tool() to:
And if you do this, it should be one patch, not four.
-- Steve
>
> void osnoise_destroy_tool(struct osnoise_tool *top)
> {
> if (!top)
> return;
>
> trace_instance_destroy(&top->trace);
>
> if (top->context)
> osnoise_put_context(top->context);
>
> free(top);
> }
>
> Then you don't need these extra labels and if statements in the main code.
next prev parent reply other threads:[~2022-02-03 16:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1643033113.git.bristot@kernel.org>
2022-01-24 14:24 ` [PATCH 1/8] rtla: Follow kernel version Daniel Bristot de Oliveira
2022-01-24 14:24 ` [PATCH 2/8] rtla/utils: Fix session duration parsing Daniel Bristot de Oliveira
2022-01-24 14:24 ` [PATCH 3/8] rtla/osnoise_top: Fix segmentation fault when failing to enable -t Daniel Bristot de Oliveira
2022-02-03 16:41 ` Steven Rostedt
2022-02-03 16:43 ` Steven Rostedt [this message]
2022-02-03 17:30 ` Daniel Bristot de Oliveira
2022-02-03 17:56 ` Steven Rostedt
2022-01-24 14:24 ` [PATCH 4/8] rtla/osnoise_hist: " Daniel Bristot de Oliveira
2022-01-24 14:24 ` [PATCH 5/8] rtla/timerlat_top: " Daniel Bristot de Oliveira
2022-01-24 14:24 ` [PATCH 6/8] rtla/timerlat_hist: " Daniel Bristot de Oliveira
2022-01-24 14:24 ` [PATCH 7/8] rtla/osnoise: Fix error message when failing to enable trace instance Daniel Bristot de Oliveira
2022-01-24 14:24 ` [PATCH 8/8] rtla/trace: Error message fixup Daniel Bristot de Oliveira
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=20220203114303.575910f8@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=bristot@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-devel@vger.kernel.org \
/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).