server session BUGFIX returns cleaned and fixed
diff --git a/src/session_server_ssh.c b/src/session_server_ssh.c
index 2055c91..b06d7ba 100644
--- a/src/session_server_ssh.c
+++ b/src/session_server_ssh.c
@@ -78,7 +78,7 @@
opts->sshbind = ssh_bind_new();
if (!opts->sshbind) {
ERR("Failed to create a new ssh_bind.");
- goto fail;
+ return -1;
}
}
@@ -88,11 +88,10 @@
} else {
ERR("Failed to set host key (%s).", ssh_get_error(opts->sshbind));
}
- goto fail;
+ return -1;
}
-fail:
- return -1;
+ return 0;
}
API int
@@ -137,16 +136,13 @@
opts->sshbind = ssh_bind_new();
if (!opts->sshbind) {
ERR("Failed to create a new ssh_bind.");
- goto fail;
+ return -1;
}
}
ssh_bind_options_set(opts->sshbind, SSH_BIND_OPTIONS_BANNER, banner);
return 0;
-
-fail:
- return -1;
}
API int