mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 06:20:10 +01:00
libnm/vpn: don't leak editor-plugin if nm_vpn_editor_plugin_load() fails
This commit is contained in:
parent
d350d72a2e
commit
c1147fc71b
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue