tracing: Avoid memory leak in predicate_parse()
In case of errors, predicate_parse() goes to the out_free label to free memory and to return an error code. However, predicate_parse() does not free the predicates of the temporary prog_stack array, thence leaking them. Link: http://lkml.kernel.org/r/20190528154338.29976-1-tomasbortoli@gmail.com Cc: stable@vger.kernel.org Fixes: 80765597 ("tracing: Rewrite filter logic to be simpler and faster") Reported-by:<syzbot+6b8e0fb820e570c59e19@syzkaller.appspotmail.com> Signed-off-by:
Tomas Bortoli <tomasbortoli@gmail.com> [ Added protection around freeing prog_stack[i].pred ] Signed-off-by:
Steven Rostedt (VMware) <rostedt@goodmis.org>
parent
0c97bf86
Please register or sign in to comment