kernel-shark: Fix memory leak in KsPlotget::getTaskColorTable()

The std::vector constructor used here makes a copy of the data, so
the memory used by the original array has to be freed.

This is a major leak because getTaskColorTable() gets called every
time when we redraw the plots.

BTW calling getTaskColorTable() every time when we redraw makes
no sense. This will be fixed in the following patch.

Link: http://lore.kernel.org/linux-trace-devel/20190314151012.905-9-ykaradzhov@vmware.com

Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 file changed