aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/unix/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/unix/plugin.c')
-rw-r--r--src/vlib/unix/plugin.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vlib/unix/plugin.c b/src/vlib/unix/plugin.c
index b4eb0b92fb4..61eaad471ff 100644
--- a/src/vlib/unix/plugin.c
+++ b/src/vlib/unix/plugin.c
@@ -155,7 +155,8 @@ load_one_plugin (plugin_main_t * pm, plugin_info_t * pi, int from_early_init)
{
/* This should never happen unless somebody chagnes registration macro */
clib_warning ("Missing plugin registration in plugin '%s'", pi->name);
- os_exit (1);
+ dlclose (pi->handle);
+ goto error;
}
pi->reg = reg;
@@ -175,7 +176,8 @@ load_one_plugin (plugin_main_t * pm, plugin_info_t * pi, int from_early_init)
if (error)
{
clib_error_report (error);
- os_exit (1);
+ dlclose (pi->handle);
+ goto error;
}
}
else