fence-virt: Fix possible descriptor leak

Add missing dlclose after loading plugins.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
This commit is contained in:
Ryan McCabe 2012-10-17 11:08:38 -04:00
parent 85ecac5cff
commit d093fecd8e

View File

@ -299,8 +299,10 @@ plugin_load(const char *libpath)
} }
if (!backend_plugin_load(handle, libpath) || if (!backend_plugin_load(handle, libpath) ||
!listener_plugin_load(handle, libpath)) !listener_plugin_load(handle, libpath)) {
dlclose(handle);
return 0; return 0;
}
dbg_printf(3, "%s is not a valid plugin\n", libpath); dbg_printf(3, "%s is not a valid plugin\n", libpath);
dlclose(handle); dlclose(handle);