Re: [PATCH] rtla/osnoise: prevent NULL dereference in error handling

2024-08-12 Thread Luis Claudio R. Goncalves
On Fri, Aug 09, 2024 at 03:34:30PM +0300, Dan Carpenter wrote: > If the "tool->data" allocation fails then there is no need to call > osnoise_free_top() and, in fact, doing so will lead to a NULL dereference. > > Fixes: 1eceb2fc2ca5 ("rtla/osnoise: Add osnoise top mode") > Signed-off-by: Dan Carpe

Re: [PATCH] rtla/osnoise: prevent NULL dereference in error handling

2024-08-09 Thread John Kacur
On Fri, 9 Aug 2024, Steven Rostedt wrote: > On Fri, 9 Aug 2024 13:53:33 -0400 (EDT) > John Kacur wrote: > > > > > > Although your fix appears to be correct, I wonder if it would be better > > > > to > > > > create a second error label, such as out_destroy_tool: as described in > > > > sec

Re: [PATCH] rtla/osnoise: prevent NULL dereference in error handling

2024-08-09 Thread Steven Rostedt
On Fri, 9 Aug 2024 13:53:33 -0400 (EDT) John Kacur wrote: > > > Although your fix appears to be correct, I wonder if it would be better > > > to > > > create a second error label, such as out_destroy_tool: as described in > > > section 7 of the coding-style.rst > > > > > > > There's no re

Re: [PATCH] rtla/osnoise: prevent NULL dereference in error handling

2024-08-09 Thread John Kacur
On Fri, 9 Aug 2024, Steven Rostedt wrote: > On Fri, 9 Aug 2024 13:34:28 -0400 (EDT) > John Kacur wrote: > > > On Fri, 9 Aug 2024, Dan Carpenter wrote: > > > > > If the "tool->data" allocation fails then there is no need to call > > > osnoise_free_top() and, in fact, doing so will lead to a N

Re: [PATCH] rtla/osnoise: prevent NULL dereference in error handling

2024-08-09 Thread Steven Rostedt
On Fri, 9 Aug 2024 13:34:28 -0400 (EDT) John Kacur wrote: > On Fri, 9 Aug 2024, Dan Carpenter wrote: > > > If the "tool->data" allocation fails then there is no need to call > > osnoise_free_top() and, in fact, doing so will lead to a NULL dereference. > > > > Fixes: 1eceb2fc2ca5 ("rtla/osnoise

Re: [PATCH] rtla/osnoise: prevent NULL dereference in error handling

2024-08-09 Thread John Kacur
On Fri, 9 Aug 2024, Dan Carpenter wrote: > If the "tool->data" allocation fails then there is no need to call > osnoise_free_top() and, in fact, doing so will lead to a NULL dereference. > > Fixes: 1eceb2fc2ca5 ("rtla/osnoise: Add osnoise top mode") > Signed-off-by: Dan Carpenter > --- > too

[PATCH] rtla/osnoise: prevent NULL dereference in error handling

2024-08-09 Thread Dan Carpenter
If the "tool->data" allocation fails then there is no need to call osnoise_free_top() and, in fact, doing so will lead to a NULL dereference. Fixes: 1eceb2fc2ca5 ("rtla/osnoise: Add osnoise top mode") Signed-off-by: Dan Carpenter --- tools/tracing/rtla/src/osnoise_top.c | 11 --- 1 file