server session BUGFIX duplicate has before freeing the buffer
diff --git a/src/session_server_ssh.c b/src/session_server_ssh.c
index c339729..2f77d26 100644
--- a/src/session_server_ssh.c
+++ b/src/session_server_ssh.c
@@ -822,8 +822,9 @@
         goto error;
     }
 
+    pass_hash = strdup(pass_hash);
     free(buf);
-    return strdup(pass_hash);
+    return pass_hash;
 
 error:
     free(buf);