diff options
Diffstat (limited to 'kex.c')
-rw-r--r-- | kex.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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 | ||
420 | static int | 420 | static 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 | ||