diff options
author | Thomas Haller <thaller@redhat.com> | 2016-04-22 18:48:10 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-04-28 15:00:04 +0200 |
commit | c1147fc71bf09822aa7e45b5ee20006e25c51614 (patch) | |
tree | aa8efe23b717d1a02ec101562b98b54ca3884a2f /libnm-core/nm-vpn-editor-plugin.c | |
parent | d350d72a2ec2a32423b71d24dd2885efb05724af (diff) | |
download | NetworkManager-c1147fc71bf09822aa7e45b5ee20006e25c51614.tar.gz |
libnm/vpn: don't leak editor-plugin if nm_vpn_editor_plugin_load() fails
Diffstat (limited to 'libnm-core/nm-vpn-editor-plugin.c')
-rw-r--r-- | libnm-core/nm-vpn-editor-plugin.c | 3 |
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; |