plugin: Always dlclose() a module with a handle
Even if it doesn't have a ca_exit function. Otherwise it will leave modules lying around. Signed-off-by: Corey Minyard <minyard@acm.org>
This commit is contained in:
parent
54ba56a41e
commit
c94ca6179f
1 changed files with 4 additions and 4 deletions
|
|
@ -582,10 +582,10 @@ clixon_plugin_exit_one(clixon_plugin_t *cp,
|
|||
}
|
||||
if (clixon_resource_check(h, &wh, cp->cp_name, __FUNCTION__) < 0)
|
||||
goto done;
|
||||
if (dlclose(cp->cp_handle) != 0) {
|
||||
error = (char*)dlerror();
|
||||
clixon_err(OE_PLUGIN, errno, "dlclose: %s", error ? error : "Unknown error");
|
||||
}
|
||||
}
|
||||
if (cp->cp_handle && dlclose(cp->cp_handle) != 0) {
|
||||
error = (char*)dlerror();
|
||||
clixon_err(OE_PLUGIN, errno, "dlclose: %s", error ? error : "Unknown error");
|
||||
}
|
||||
retval = 0;
|
||||
done:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue