[PATCH] connection-editor: Fix wired 802-1x secrets saving



In case of wired 802-1x connection a temporary connection object is used,
but since NM commit 6a19e68a7d856629600655a076b0cea4be346799
secrets are cleared when the object is destroyed.
So duplicate 802-1x settings instead of using g_object_ref().
---
 src/connection-editor/page-8021x-security.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/connection-editor/page-8021x-security.c b/src/connection-editor/page-8021x-security.c
index 5af6111..afc4e88 100644
--- a/src/connection-editor/page-8021x-security.c
+++ b/src/connection-editor/page-8021x-security.c
@@ -159,7 +159,7 @@ ce_page_validate_v (CEPage *page, NMConnection *connection, GError **error)
                        ws_802_1x_fill_connection (priv->security, "wpa_eap_auth_combo", tmp_connection);
 
                        s_8021x = nm_connection_get_setting (tmp_connection, NM_TYPE_SETTING_802_1X);
-                       nm_connection_add_setting (connection, NM_SETTING (g_object_ref (s_8021x)));
+                       nm_connection_add_setting (connection, nm_setting_duplicate (s_8021x));
 
                        g_object_unref (tmp_connection);
                }
-- 
2.7.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]