Re: [PATCH] [traceevent] add_new_comm(): Fix memory leak

2020-06-14 Thread Steven Rostedt
On Sun, 14 Jun 2020 14:14:53 -0400 Gaurav Singh wrote: > The pointer cmdlines need to be explicity freed in case the > realloc() fails. Fix it by adding a free() if realloc() > returns a NULL pointer. > > Signed-off-by: Gaurav Singh > --- > tools/lib/traceevent/event-parse.c | 7 --- > 1 f

[PATCH] [traceevent] add_new_comm(): Fix memory leak

2020-06-14 Thread Gaurav Singh
The pointer cmdlines need to be explicity freed in case the realloc() fails. Fix it by adding a free() if realloc() returns a NULL pointer. Signed-off-by: Gaurav Singh --- tools/lib/traceevent/event-parse.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/lib/trac