trace-cmd: Call dlclose() in the error path of load_plugin()

The handle returned by dlopen() isn't closes if something else fails
afterwards. Call dlclose in the error path to fix that.

Fixes a RESOURCE_LEAK error (CWE-772)

Link: https://lore.kernel.org/linux-trace-devel/20240605134054.2626953-5-jmarchan@redhat.com

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
[ Fixed whitespace issues ]
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 file changed