session client BUGFIX memory leak
diff --git a/src/session_client_ssh.c b/src/session_client_ssh.c
index 0b0bdb9..bd25b68 100644
--- a/src/session_client_ssh.c
+++ b/src/session_client_ssh.c
@@ -1705,7 +1705,7 @@
         pw = nc_getpwuid(getuid(), &pw_buf, &buf, &buf_len);
         if (!pw) {
             ERR(session, "Unknown username for the SSH connection (%s).", strerror(errno));
-            return NULL;
+            goto fail;
         } else {
             username = pw->pw_name;
         }
@@ -1717,7 +1717,7 @@
     session = nc_new_session(NC_CLIENT, 0);
     if (!session) {
         ERRMEM;
-        return NULL;
+        goto fail;
     }
     session->status = NC_STATUS_STARTING;