diff options
Diffstat (limited to 'kex.c')
-rw-r--r-- | kex.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: kex.c,v 1.187 2024/08/23 04:51:00 deraadt Exp $ */ +/* $OpenBSD: kex.c,v 1.189 2025/09/15 04:40:34 djm Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * @@ -33,9 +33,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> -#ifdef HAVE_POLL_H #include <poll.h> -#endif #ifdef WITH_OPENSSL #include <openssl/crypto.h> @@ -563,8 +561,6 @@ kex_input_newkeys(int type, u_int32_t seq, struct ssh *ssh) kex->flags &= ~KEX_INITIAL; sshbuf_reset(kex->peer); kex->flags &= ~KEX_INIT_SENT; - free(kex->name); - kex->name = NULL; return 0; } @@ -620,6 +616,8 @@ kex_input_kexinit(int type, u_int32_t seq, struct ssh *ssh) error_f("no kex"); return SSH_ERR_INTERNAL_ERROR; } + free(kex->name); + kex->name = NULL; ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, &kex_protocol_error); ptr = sshpkt_ptr(ssh, &dlen); if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0) @@ -742,6 +740,7 @@ kex_free(struct kex *kex) free(kex->failed_choice); free(kex->hostkey_alg); free(kex->name); + free(kex->server_sig_algs); free(kex); } |