diff options
author | djm@openbsd.org <djm@openbsd.org> | 2015-01-30 01:13:33 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-30 12:18:59 +1100 |
commit | 4509b5d4a4fa645a022635bfa7e86d09b285001f (patch) | |
tree | cb94ac37e4d5c59a3a5c2cde3b6c76363e7035d3 /ssh_api.c | |
parent | 669aee994348468af8b4b2ebd29b602cf2860b22 (diff) |
upstream commit
avoid more fatal/exit in the packet.c paths that
ssh-keyscan uses; feedback and "looks good" markus@
Diffstat (limited to 'ssh_api.c')
-rw-r--r-- | ssh_api.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh_api.c,v 1.2 2015/01/26 06:10:03 djm Exp $ */ | 1 | /* $OpenBSD: ssh_api.c,v 1.3 2015/01/30 01:13:33 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2012 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2012 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -85,7 +85,8 @@ ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params) | |||
85 | called = 1; | 85 | called = 1; |
86 | } | 86 | } |
87 | 87 | ||
88 | ssh = ssh_packet_set_connection(NULL, -1, -1); | 88 | if ((ssh = ssh_packet_set_connection(NULL, -1, -1)) == NULL) |
89 | return SSH_ERR_ALLOC_FAIL; | ||
89 | if (is_server) | 90 | if (is_server) |
90 | ssh_packet_set_server(ssh); | 91 | ssh_packet_set_server(ssh); |
91 | 92 | ||