summaryrefslogtreecommitdiff
path: root/kex.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-06-02 07:31:17 +1000
committerDarren Tucker <dtucker@zip.com.au>2013-06-02 07:31:17 +1000
commita627d42e51ffa71e014d7b2d2c07118122fd3ec3 (patch)
tree7bda769de81f509e28d800916fa20abd37906d79 /kex.c
parentc7aad0058c957afeb26a3f703e8cb0eddeb62365 (diff)
- djm@cvs.openbsd.org 2013/05/17 00:13:13
[xmalloc.h cipher.c sftp-glob.c ssh-keyscan.c ssh.c sftp-common.c ssh-ecdsa.c auth2-chall.c compat.c readconf.c kexgexs.c monitor.c gss-genr.c cipher-3des1.c kex.c monitor_wrap.c ssh-pkcs11-client.c auth-options.c rsa.c auth2-pubkey.c sftp.c hostfile.c auth2.c servconf.c auth.c authfile.c xmalloc.c uuencode.c sftp-client.c auth2-gss.c sftp-server.c bufaux.c mac.c session.c jpake.c kexgexc.c sshconnect.c auth-chall.c auth2-passwd.c sshconnect1.c buffer.c kexecdhs.c kexdhs.c ssh-rsa.c auth1.c ssh-pkcs11.c auth2-kbdint.c kexdhc.c sshd.c umac.c ssh-dss.c auth2-jpake.c bufbn.c clientloop.c monitor_mm.c scp.c roaming_client.c serverloop.c key.c auth-rsa.c ssh-pkcs11-helper.c ssh-keysign.c ssh-keygen.c match.c channels.c sshconnect2.c addrmatch.c mux.c canohost.c kexecdhc.c schnorr.c ssh-add.c misc.c auth2-hostbased.c ssh-agent.c bufec.c groupaccess.c dns.c packet.c readpass.c authfd.c moduli.c] bye, bye xfree(); ok markus@
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/kex.c b/kex.c
index 6b43a6dee..54bd1a438 100644
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kex.c,v 1.90 2013/04/19 12:07:08 djm Exp $ */ 1/* $OpenBSD: kex.c,v 1.91 2013/05/17 00:13:13 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
4 * 4 *
@@ -126,12 +126,12 @@ kex_names_valid(const char *names)
126 (p = strsep(&cp, ","))) { 126 (p = strsep(&cp, ","))) {
127 if (kex_alg_by_name(p) == NULL) { 127 if (kex_alg_by_name(p) == NULL) {
128 error("Unsupported KEX algorithm \"%.100s\"", p); 128 error("Unsupported KEX algorithm \"%.100s\"", p);
129 xfree(s); 129 free(s);
130 return 0; 130 return 0;
131 } 131 }
132 } 132 }
133 debug3("kex names ok: [%s]", names); 133 debug3("kex names ok: [%s]", names);
134 xfree(s); 134 free(s);
135 return 1; 135 return 1;
136} 136}
137 137
@@ -191,8 +191,8 @@ kex_prop_free(char **proposal)
191 u_int i; 191 u_int i;
192 192
193 for (i = 0; i < PROPOSAL_MAX; i++) 193 for (i = 0; i < PROPOSAL_MAX; i++)
194 xfree(proposal[i]); 194 free(proposal[i]);
195 xfree(proposal); 195 free(proposal);
196} 196}
197 197
198/* ARGSUSED */ 198/* ARGSUSED */
@@ -229,7 +229,7 @@ kex_finish(Kex *kex)
229 buffer_clear(&kex->peer); 229 buffer_clear(&kex->peer);
230 /* buffer_clear(&kex->my); */ 230 /* buffer_clear(&kex->my); */
231 kex->flags &= ~KEX_INIT_SENT; 231 kex->flags &= ~KEX_INIT_SENT;
232 xfree(kex->name); 232 free(kex->name);
233 kex->name = NULL; 233 kex->name = NULL;
234} 234}
235 235
@@ -286,7 +286,7 @@ kex_input_kexinit(int type, u_int32_t seq, void *ctxt)
286 for (i = 0; i < KEX_COOKIE_LEN; i++) 286 for (i = 0; i < KEX_COOKIE_LEN; i++)
287 packet_get_char(); 287 packet_get_char();
288 for (i = 0; i < PROPOSAL_MAX; i++) 288 for (i = 0; i < PROPOSAL_MAX; i++)
289 xfree(packet_get_string(NULL)); 289 free(packet_get_string(NULL));
290 /* 290 /*
291 * XXX RFC4253 sec 7: "each side MAY guess" - currently no supported 291 * XXX RFC4253 sec 7: "each side MAY guess" - currently no supported
292 * KEX method has the server move first, but a server might be using 292 * KEX method has the server move first, but a server might be using
@@ -414,7 +414,7 @@ choose_hostkeyalg(Kex *k, char *client, char *server)
414 k->hostkey_type = key_type_from_name(hostkeyalg); 414 k->hostkey_type = key_type_from_name(hostkeyalg);
415 if (k->hostkey_type == KEY_UNSPEC) 415 if (k->hostkey_type == KEY_UNSPEC)
416 fatal("bad hostkey alg '%s'", hostkeyalg); 416 fatal("bad hostkey alg '%s'", hostkeyalg);
417 xfree(hostkeyalg); 417 free(hostkeyalg);
418} 418}
419 419
420static int 420static int
@@ -468,7 +468,7 @@ kex_choose_conf(Kex *kex)
468 roaming = match_list(KEX_RESUME, peer[PROPOSAL_KEX_ALGS], NULL); 468 roaming = match_list(KEX_RESUME, peer[PROPOSAL_KEX_ALGS], NULL);
469 if (roaming) { 469 if (roaming) {
470 kex->roaming = 1; 470 kex->roaming = 1;
471 xfree(roaming); 471 free(roaming);
472 } 472 }
473 } 473 }
474 474