From 42fc6b6f9fbf58293b070f4de377c7695c275a8a Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Mon, 15 Sep 2025 04:49:41 +0000 Subject: [PATCH] upstream: memleak of hostkey when downgrading host cert->key; ok dtucker OpenBSD-Commit-ID: f6f1f38a8ec144fb615434f6877066cf4610b826 --- sshconnect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sshconnect.c b/sshconnect.c index bef9f9bc3..0f260a2cd 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.374 2025/08/29 03:50:38 djm Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.375 2025/09/15 04:49:41 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1426,6 +1426,7 @@ check_host_key(char *hostname, const struct ssh_conn_info *cinfo, options.update_hostkeys = 0; } + sshkey_free(raw_key); free(ip); free(host); if (host_hostkeys != NULL) -- 2.47.3