]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: memleak of keys not used for authentication; ok
authordjm@openbsd.org <djm@openbsd.org>
Mon, 15 Sep 2025 04:51:35 +0000 (04:51 +0000)
committerDamien Miller <djm@mindrot.org>
Mon, 15 Sep 2025 06:13:24 +0000 (16:13 +1000)
dtucker@

OpenBSD-Commit-ID: ddfda79d243150fbd382d8f2cd75a90a072b3669

sshconnect2.c

index 1ee6000ab0cc63ef08e71b28f77a88a1f7bdac52..b3679c9d7f3c77b56ae468159d44091f75307476 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.377 2025/02/18 08:02:48 djm Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.378 2025/09/15 04:51:35 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Damien Miller.  All rights reserved.
@@ -1815,7 +1815,7 @@ pubkey_prepare(struct ssh *ssh, Authctxt *authctxt)
                TAILQ_REMOVE(preferred, id, next);
                sshkey_free(id->key);
                free(id->filename);
-               memset(id, 0, sizeof(*id));
+               freezero(id, sizeof(*id));
        }
        /* List the keys we plan on using */
        TAILQ_FOREACH_SAFE(id, preferred, next, id2) {