diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2013-05-17 00:13:15 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2013-05-17 00:13:15 +0000 |
commit | 409be4d4675d916b5b1c9fa8479f8bfb976bf6f8 (patch) | |
tree | 0f56c7b11057de46f80c5ef8b2e149fa995cf67a /usr.bin/ssh/auth2-chall.c | |
parent | af69bdb6a9d8cb8abd4fa0691ae6551f912e4776 (diff) |
bye, bye xfree(); ok markus@
Diffstat (limited to 'usr.bin/ssh/auth2-chall.c')
-rw-r--r-- | usr.bin/ssh/auth2-chall.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/usr.bin/ssh/auth2-chall.c b/usr.bin/ssh/auth2-chall.c index 2cfba12ae16..79559e3ebcd 100644 --- a/usr.bin/ssh/auth2-chall.c +++ b/usr.bin/ssh/auth2-chall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-chall.c,v 1.37 2013/03/07 19:27:25 markus Exp $ */ +/* $OpenBSD: auth2-chall.c,v 1.38 2013/05/17 00:13:13 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Per Allansson. All rights reserved. @@ -102,11 +102,9 @@ kbdint_free(KbdintAuthctxt *kbdintctxt) { if (kbdintctxt->device) kbdint_reset_device(kbdintctxt); - if (kbdintctxt->devices) { - xfree(kbdintctxt->devices); - kbdintctxt->devices = NULL; - } - xfree(kbdintctxt); + free(kbdintctxt->devices); + bzero(kbdintctxt, sizeof(*kbdintctxt)); + free(kbdintctxt); } /* get next device */ static int @@ -133,7 +131,7 @@ kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt) } t = kbdintctxt->devices; kbdintctxt->devices = t[len] ? xstrdup(t+len+1) : NULL; - xfree(t); + free(t); debug2("kbdint_next_device: devices %s", kbdintctxt->devices ? kbdintctxt->devices : "<empty>"); } while (kbdintctxt->devices && !kbdintctxt->device); @@ -227,11 +225,11 @@ send_userauth_info_request(Authctxt *authctxt) packet_write_wait(); for (i = 0; i < kbdintctxt->nreq; i++) - xfree(prompts[i]); - xfree(prompts); - xfree(echo_on); - xfree(name); - xfree(instr); + free(prompts[i]); + free(prompts); + free(echo_on); + free(name); + free(instr); return 1; } @@ -270,10 +268,9 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt) for (i = 0; i < nresp; i++) { memset(response[i], 'r', strlen(response[i])); - xfree(response[i]); + free(response[i]); } - if (response) - xfree(response); + free(response); switch (res) { case 0: |