From d093fecd8ecef0e94a9f6d1f3fa763525fd776a8 Mon Sep 17 00:00:00 2001 From: Ryan McCabe Date: Wed, 17 Oct 2012 11:08:38 -0400 Subject: [PATCH] fence-virt: Fix possible descriptor leak Add missing dlclose after loading plugins. Signed-off-by: Ryan McCabe --- server/plugin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/plugin.c b/server/plugin.c index 8782ea4..ed48012 100644 --- a/server/plugin.c +++ b/server/plugin.c @@ -299,8 +299,10 @@ plugin_load(const char *libpath) } if (!backend_plugin_load(handle, libpath) || - !listener_plugin_load(handle, libpath)) + !listener_plugin_load(handle, libpath)) { + dlclose(handle); return 0; + } dbg_printf(3, "%s is not a valid plugin\n", libpath); dlclose(handle);