From 90bc2c091a29baa5e32009c9850aafb6dd6a1e37 Mon Sep 17 00:00:00 2001 From: Krisztian Litkey Date: Thu, 6 Nov 2014 12:58:46 +0200 Subject: [PATCH] core: don't leak RTLD_LOCAL-ly opened handles for core plugins. --- src/core/plugin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/plugin.c b/src/core/plugin.c index f063ca6..e3e4398 100644 --- a/src/core/plugin.c +++ b/src/core/plugin.c @@ -742,9 +742,11 @@ static mrp_plugin_descr_t *open_dynamic(mrp_context_t *ctx, const char *name, if (d->init != NULL && d->exit != NULL && d->name != NULL) { if (!d->core) *handle = h; - else + else { *handle = dlopen(path, RTLD_LAZY|RTLD_GLOBAL|RTLD_NOLOAD); + dlclose(h); + } return d; } -- 2.7.4