libnetconf2 REFACTOR initial libyang2 support
diff --git a/src/session_client_ssh.c b/src/session_client_ssh.c
index 89ef3b5..3c3ce1f 100644
--- a/src/session_client_ssh.c
+++ b/src/session_client_ssh.c
@@ -1650,13 +1650,13 @@
 
     /* store information into the dictionary */
     if (host) {
-        session->host = lydict_insert_zc(ctx, host);
+        lydict_insert_zc(ctx, host, &session->host);
     }
     if (port) {
         session->port = port;
     }
     if (username) {
-        session->username = lydict_insert_zc(ctx, username);
+        lydict_insert_zc(ctx, username, &session->username);
     }
 
     return session;
@@ -1757,9 +1757,9 @@
     }
 
     /* store information into the dictionary */
-    session->host = lydict_insert_zc(ctx, ip_host);
+    lydict_insert_zc(ctx, ip_host, &session->host);
     session->port = port;
-    session->username = lydict_insert(ctx, username, 0);
+    lydict_insert(ctx, username, 0, &session->username);
 
     return session;
 
@@ -1833,9 +1833,9 @@
     }
 
     /* store information into session and the dictionary */
-    new_session->host = lydict_insert(ctx, session->host, 0);
+    lydict_insert(ctx, session->host, 0, &new_session->host);
     new_session->port = session->port;
-    new_session->username = lydict_insert(ctx, session->username, 0);
+    lydict_insert(ctx, session->username, 0, &new_session->username);
 
     return new_session;