summaryrefslogtreecommitdiff
path: root/regress/unittests/kex/test_kex.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-12-27 03:37:49 +0000
committerDamien Miller <djm@mindrot.org>2018-12-27 14:39:53 +1100
commiteb347d086c35428c47fe52b34588cbbc9b49d9a6 (patch)
tree7f3f009bc59af1c5113d76ead326ca89588d9b4a /regress/unittests/kex/test_kex.c
parentbb542f0cf6f7511a22a08c492861e256a82376a9 (diff)
upstream: ssh_packet_set_state() now frees ssh->kex implicitly, so
don't do explicit kex_free() beforehand OpenBSD-Regress-ID: f2f73bad47f62a2040ccba0a72cadcb12eda49cf
Diffstat (limited to 'regress/unittests/kex/test_kex.c')
-rw-r--r--regress/unittests/kex/test_kex.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/regress/unittests/kex/test_kex.c b/regress/unittests/kex/test_kex.c
index 6e5999bb9..90f1ebf45 100644
--- a/regress/unittests/kex/test_kex.c
+++ b/regress/unittests/kex/test_kex.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: test_kex.c,v 1.2 2015/07/10 06:23:25 markus Exp $ */ 1/* $OpenBSD: test_kex.c,v 1.3 2018/12/27 03:37:49 djm Exp $ */
2/* 2/*
3 * Regress test KEX 3 * Regress test KEX
4 * 4 *
@@ -139,7 +139,6 @@ do_kex_with_key(char *kex, int keytype, int bits)
139 ASSERT_INT_EQ(ssh_init(&server2, 1, NULL), 0); 139 ASSERT_INT_EQ(ssh_init(&server2, 1, NULL), 0);
140 ASSERT_PTR_NE(server2, NULL); 140 ASSERT_PTR_NE(server2, NULL);
141 ASSERT_INT_EQ(ssh_add_hostkey(server2, private), 0); 141 ASSERT_INT_EQ(ssh_add_hostkey(server2, private), 0);
142 kex_free(server2->kex); /* XXX or should ssh_packet_set_state()? */
143 ASSERT_INT_EQ(ssh_packet_set_state(server2, state), 0); 142 ASSERT_INT_EQ(ssh_packet_set_state(server2, state), 0);
144 ASSERT_INT_EQ(sshbuf_len(state), 0); 143 ASSERT_INT_EQ(sshbuf_len(state), 0);
145 sshbuf_free(state); 144 sshbuf_free(state);