libtracefs: Remove double free attempt of new_event in tracefs_synth_echo_cmd()

The "out_free" path frees the synth->dyn_event if new_event is set, but it
is also freed in the success path (that falls through into the out_free
path). The only reason this did not crash is because both cases set the
"synth->dyn_event" to NULL, where the second attempt to free it does
nothing. But this is still a bug.

Link: https://lore.kernel.org/linux-trace-devel/20220819020349.747429-3-rostedt@goodmis.org

Fixes: d7c5dbb7a231e ("libtracefs: Use the internal dynamic events API when creating synthetic events")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 file changed