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/20240607160542.46152-4-jmarchan@redhat.com
Fixes: 442ac241bef96 ("libtraceevent: Handle strdup() error in parse_option_name()")
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 file changed