From eee58e6c19ff863f38862844bfc6757f4104afac Mon Sep 17 00:00:00 2001 From: djm Date: Thu, 23 Aug 2018 03:01:08 +0000 Subject: [PATCH] memleak introduced in r1.83; from Colin Watson --- usr.bin/ssh/auth2-pubkey.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/ssh/auth2-pubkey.c b/usr.bin/ssh/auth2-pubkey.c index af9e5f04c45..0fa0ca2fb9d 100644 --- a/usr.bin/ssh/auth2-pubkey.c +++ b/usr.bin/ssh/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. * @@ -190,7 +190,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", @@ -232,6 +231,7 @@ done: } debug2("%s: authenticated %d pkalg %s", __func__, authenticated, pkalg); + sshbuf_free(b); sshauthopt_free(authopts); sshkey_free(key); free(userstyle); -- 2.20.1