Re: [PATCH] tracing: Fix a memory leak bug

2019-04-19 Thread Wenwen Wang
On Fri, Apr 19, 2019 at 9:37 PM Steven Rostedt wrote: > > On Fri, 19 Apr 2019 21:22:59 -0500 > Wenwen Wang wrote: > > > In trace_pid_write(), the buffer for trace parser is allocated through > > kmalloc() in trace_parser_get_init(). Later on, after the buffer is used, > > it is then freed

Re: [PATCH] tracing: Fix a memory leak bug

2019-04-19 Thread Steven Rostedt
On Fri, 19 Apr 2019 21:22:59 -0500 Wenwen Wang wrote: > In trace_pid_write(), the buffer for trace parser is allocated through > kmalloc() in trace_parser_get_init(). Later on, after the buffer is used, > it is then freed through kfree() in trace_parser_put(). However, it is > possible that

[PATCH] tracing: Fix a memory leak bug

2019-04-19 Thread Wenwen Wang
In trace_pid_write(), the buffer for trace parser is allocated through kmalloc() in trace_parser_get_init(). Later on, after the buffer is used, it is then freed through kfree() in trace_parser_put(). However, it is possible that trace_pid_write() is terminated due to unexpected errors, e.g.,