summaryrefslogtreecommitdiffstats
path: root/libssh/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/client.c')
-rw-r--r--libssh/client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libssh/client.c b/libssh/client.c
index 57cbd18..70956c9 100644
--- a/libssh/client.c
+++ b/libssh/client.c
@@ -204,7 +204,9 @@ static int dh_handshake(SSH_SESSION *session) {
if (dh_generate_x(session) < 0) {
goto error;
}
- dh_generate_e(session);
+ if (dh_generate_e(session) < 0) {
+ goto error;
+ }
e = dh_get_e(session);
if (e == NULL) {