trace-cmd: BUG fix malloc() pointer validation

To reproduce the bug

mkdir /sys/kernel/debug/tracing/instances/test
./trace-cmd show -B test -s -f
  Failed to allocate instance path snapshot

Link: http://lkml.kernel.org/r/20170423102258.21609-6-federico.vaga@vaga.pv.it

Signed-off-by: Federico Vaga <federico.vaga@vaga.pv.it>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 file changed