summaryrefslogtreecommitdiff
path: root/auth2-pubkey.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-08-23 03:01:08 +0000
committerDamien Miller <djm@mindrot.org>2018-08-23 13:02:21 +1000
commit7fef173c28f7462dcd8ee017fdf12b5073f54c02 (patch)
tree69b7561b47f5452067248424a6ef3e7957cac43e /auth2-pubkey.c
parentb8ae02a2896778b8984c7f51566c7f0f56fa8b56 (diff)
upstream: memleak introduced in r1.83; from Colin Watson
OpenBSD-Commit-ID: 5c019104c280cbd549a264a7217b67665e5732dc
Diffstat (limited to 'auth2-pubkey.c')
-rw-r--r--auth2-pubkey.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/auth2-pubkey.c b/auth2-pubkey.c
index e1c15040..3d9f9af1 100644
--- a/auth2-pubkey.c
+++ b/auth2-pubkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2-pubkey.c,v 1.83 2018/07/31 03:10:27 djm Exp $ */
+/* $OpenBSD: auth2-pubkey.c,v 1.84 2018/08/23 03:01:08 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -193,7 +193,6 @@ userauth_pubkey(struct ssh *ssh)
ssh->compat)) == 0) {
authenticated = 1;
}
- sshbuf_free(b);
auth2_record_key(authctxt, authenticated, key);
} else {
debug("%s: test pkalg %s pkblob %s%s%s",
@@ -235,6 +234,7 @@ done:
}
debug2("%s: authenticated %d pkalg %s", __func__, authenticated, pkalg);
+ sshbuf_free(b);
sshauthopt_free(authopts);
sshkey_free(key);
free(userstyle);