Re: [PATCH 3/8] rtla/osnoise_top: Fix segmentation fault when failing to enable -t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 3 Feb 2022 11:41:26 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> 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.



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux