From e1283824ef9278f9c7ee762152fa5750e6e60971 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 17 Jun 2015 17:46:28 +0200 Subject: [PATCH] settings: close module if loading of plugins fails (cherry picked from commit 3be5e2908ca643568277a513f60f8bb49b051561) --- src/settings/nm-settings.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index 6304e7400c..66221f28cc 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -744,6 +744,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error) "Could not find plugin '%s' factory function.", pname); success = FALSE; + g_module_close (plugin); break; } @@ -753,6 +754,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error) "Plugin '%s' returned invalid system config object.", pname); success = FALSE; + g_module_close (plugin); break; }