diff options
author | Darren Tucker <dtucker@zip.com.au> | 2013-06-02 07:31:17 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2013-06-02 07:31:17 +1000 |
commit | a627d42e51ffa71e014d7b2d2c07118122fd3ec3 (patch) | |
tree | 7bda769de81f509e28d800916fa20abd37906d79 /auth2-chall.c | |
parent | c7aad0058c957afeb26a3f703e8cb0eddeb62365 (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 'auth2-chall.c')
-rw-r--r-- | auth2-chall.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/auth2-chall.c b/auth2-chall.c index ed1acdd3b..98f3093ce 100644 --- a/auth2-chall.c +++ b/auth2-chall.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth2-chall.c,v 1.37 2013/03/07 19:27:25 markus Exp $ */ | 1 | /* $OpenBSD: auth2-chall.c,v 1.38 2013/05/17 00:13:13 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * Copyright (c) 2001 Per Allansson. All rights reserved. | 4 | * Copyright (c) 2001 Per Allansson. All rights reserved. |
@@ -147,11 +147,9 @@ kbdint_free(KbdintAuthctxt *kbdintctxt) | |||
147 | { | 147 | { |
148 | if (kbdintctxt->device) | 148 | if (kbdintctxt->device) |
149 | kbdint_reset_device(kbdintctxt); | 149 | kbdint_reset_device(kbdintctxt); |
150 | if (kbdintctxt->devices) { | 150 | free(kbdintctxt->devices); |
151 | xfree(kbdintctxt->devices); | 151 | bzero(kbdintctxt, sizeof(*kbdintctxt)); |
152 | kbdintctxt->devices = NULL; | 152 | free(kbdintctxt); |
153 | } | ||
154 | xfree(kbdintctxt); | ||
155 | } | 153 | } |
156 | /* get next device */ | 154 | /* get next device */ |
157 | static int | 155 | static int |
@@ -178,7 +176,7 @@ kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt) | |||
178 | } | 176 | } |
179 | t = kbdintctxt->devices; | 177 | t = kbdintctxt->devices; |
180 | kbdintctxt->devices = t[len] ? xstrdup(t+len+1) : NULL; | 178 | kbdintctxt->devices = t[len] ? xstrdup(t+len+1) : NULL; |
181 | xfree(t); | 179 | free(t); |
182 | debug2("kbdint_next_device: devices %s", kbdintctxt->devices ? | 180 | debug2("kbdint_next_device: devices %s", kbdintctxt->devices ? |
183 | kbdintctxt->devices : "<empty>"); | 181 | kbdintctxt->devices : "<empty>"); |
184 | } while (kbdintctxt->devices && !kbdintctxt->device); | 182 | } while (kbdintctxt->devices && !kbdintctxt->device); |
@@ -272,11 +270,11 @@ send_userauth_info_request(Authctxt *authctxt) | |||
272 | packet_write_wait(); | 270 | packet_write_wait(); |
273 | 271 | ||
274 | for (i = 0; i < kbdintctxt->nreq; i++) | 272 | for (i = 0; i < kbdintctxt->nreq; i++) |
275 | xfree(prompts[i]); | 273 | free(prompts[i]); |
276 | xfree(prompts); | 274 | free(prompts); |
277 | xfree(echo_on); | 275 | free(echo_on); |
278 | xfree(name); | 276 | free(name); |
279 | xfree(instr); | 277 | free(instr); |
280 | return 1; | 278 | return 1; |
281 | } | 279 | } |
282 | 280 | ||
@@ -315,10 +313,9 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt) | |||
315 | 313 | ||
316 | for (i = 0; i < nresp; i++) { | 314 | for (i = 0; i < nresp; i++) { |
317 | memset(response[i], 'r', strlen(response[i])); | 315 | memset(response[i], 'r', strlen(response[i])); |
318 | xfree(response[i]); | 316 | free(response[i]); |
319 | } | 317 | } |
320 | if (response) | 318 | free(response); |
321 | xfree(response); | ||
322 | 319 | ||
323 | switch (res) { | 320 | switch (res) { |
324 | case 0: | 321 | case 0: |