-/* $OpenBSD: packet.c,v 1.294 2020/06/26 11:26:01 semarie Exp $ */
+/* $OpenBSD: packet.c,v 1.295 2020/07/01 16:28:31 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
ssh->remote_ipaddr = NULL;
free(ssh->state);
ssh->state = NULL;
+ kex_free(ssh->kex);
+ ssh->kex = NULL;
}
}
-/* $OpenBSD: ssh_api.c,v 1.19 2019/10/31 21:23:19 djm Exp $ */
+/* $OpenBSD: ssh_api.c,v 1.20 2020/07/01 16:28:31 markus Exp $ */
/*
* Copyright (c) 2012 Markus Friedl. All rights reserved.
*
{
struct key_entry *k;
- ssh_packet_close(ssh);
/*
* we've only created the public keys variants in case we
* are a acting as a server.
TAILQ_REMOVE(&ssh->private_keys, k, next);
free(k);
}
- if (ssh->kex)
- kex_free(ssh->kex);
+ ssh_packet_close(ssh);
free(ssh);
}