[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220203114303.575910f8@gandalf.local.home>
Date: Thu, 3 Feb 2022 11:43:03 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Daniel Bristot de Oliveira <bristot@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-devel@...r.kernel.org
Subject: Re: [PATCH 3/8] rtla/osnoise_top: Fix segmentation fault when
failing to enable -t
On Thu, 3 Feb 2022 11:41:26 -0500
Steven Rostedt <rostedt@...dmis.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.
Powered by blists - more mailing lists