libtraceevent: prevent a memory leak in tep_plugin_add_option()

If parse_option_name() fails, plugin, which now points to the previous
value of option_str isn't freed. Go to out_free if that happens.

Fixes a RESOURCE_LEAK error (CWE-772)

Link: https://lore.kernel.org/linux-trace-devel/[email protected]

Fixes: 442ac241bef96 ("libtraceevent: Handle strdup() error in parse_option_name()")
Signed-off-by: Jerome Marchand <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 file changed