trace-cmd: Test for NULL pointer in tracecmd_tsync_free()

If an error happens it is possible that tracecmd_tsync_free() gets called
with a NULL pointer, which causes a SIGSEGV crash. Prevent a crash by
testing if the tsync passed into tracecmd_tsync_free() is NULL.

Link: https://lore.kernel.org/linux-trace-devel/20210324180044.748d8b4b@gandalf.local.home

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