ssh server CHANGE error message includes key path
diff --git a/src/session_server_ssh.c b/src/session_server_ssh.c
index dd87146..7187328 100644
--- a/src/session_server_ssh.c
+++ b/src/session_server_ssh.c
@@ -1312,11 +1312,14 @@
if (privkey_data && unlink(privkey_path)) {
WRN("Removing a temporary host key file \"%s\" failed (%s).", privkey_path, strerror(errno));
}
- free(privkey_path);
free(privkey_data);
if (ret != SSH_OK) {
- ERR("Failed to set hostkey \"%s\" (%d: %s).", hostkeys[i], ret, ssh_get_error(sbind));
+ ERR("Failed to set hostkey \"%s\" (%s).", hostkeys[i], privkey_path);
+ }
+ free(privkey_path);
+
+ if (ret != SSH_OK) {
return -1;
}
}