]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: free buf before return; reported by krishnaiah bommu
authordjm@openbsd.org <djm@openbsd.org>
Wed, 16 Oct 2019 06:03:30 +0000 (06:03 +0000)
committerDamien Miller <djm@mindrot.org>
Wed, 16 Oct 2019 06:08:38 +0000 (17:08 +1100)
OpenBSD-Commit-ID: 091bb23a6e913af5d4f72c50030b53ce1cef4de1

ssh-keygen.c

index 8c829cad6004829cf23bfee4c1076d54c696cdbf..27ccc15df4448b940e1d01a3e99c5d9ed6a2bfb5 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.355 2019/10/03 17:07:50 jmc Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.356 2019/10/16 06:03:30 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -651,6 +651,7 @@ do_convert_from_ssh2(struct passwd *pw, struct sshkey **k, int *private)
                *k = do_convert_private_ssh2(buf);
        else if ((r = sshkey_fromb(buf, k)) != 0)
                fatal("decode blob failed: %s", ssh_err(r));
+       sshbuf_free(buf);
        fclose(fp);
 }