summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-04-22 18:48:10 +0200
committerThomas Haller <thaller@redhat.com>2016-04-28 15:00:04 +0200
commitc1147fc71bf09822aa7e45b5ee20006e25c51614 (patch)
treeaa8efe23b717d1a02ec101562b98b54ca3884a2f
parentd350d72a2ec2a32423b71d24dd2885efb05724af (diff)
downloadNetworkManager-c1147fc71bf09822aa7e45b5ee20006e25c51614.tar.gz
libnm/vpn: don't leak editor-plugin if nm_vpn_editor_plugin_load() fails
-rw-r--r--libnm-core/nm-vpn-editor-plugin.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libnm-core/nm-vpn-editor-plugin.c b/libnm-core/nm-vpn-editor-plugin.c
index 52c89816ad..792b00f944 100644
--- a/libnm-core/nm-vpn-editor-plugin.c
+++ b/libnm-core/nm-vpn-editor-plugin.c
@@ -176,7 +176,7 @@ _nm_vpn_editor_plugin_load (const char *plugin_name,
if (!success) {
g_module_close (module);
- editor_plugin = NULL;
+ g_clear_object (&editor_plugin);
}
} else {
g_set_error (error,
@@ -185,7 +185,6 @@ _nm_vpn_editor_plugin_load (const char *plugin_name,
_("failed to load nm_vpn_editor_plugin_factory() from %s (%s)"),
g_module_name (module), g_module_error ());
g_module_close (module);
- editor_plugin = NULL;
}
return editor_plugin;