]> git.baikalelectronics.ru Git - kernel.git/commit
tools lib traceevent: Set int_array fields to NULL if freeing from error
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Tue, 9 Feb 2016 20:40:16 +0000 (15:40 -0500)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 3 Mar 2016 14:10:38 +0000 (11:10 -0300)
commit4a44bd297e2ef106da99da171262fd2731ed872f
tree44c814b7d977765424c15eda214be62cb58a5844
parent4100a879f5797cc2c7255a2efbcb7568156b4df1
tools lib traceevent: Set int_array fields to NULL if freeing from error

Had a bug where on error of parsing __print_array() where the fields are
freed after they were allocated, but since they were not set to NULL,
the freeing of the arg also tried to free the already freed fields
causing a double free.

Fix process_hex() while at it.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20160209204237.188327674@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/event-parse.c