From dd3f04ec4052760eeccd971525c79feade83d411 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 31 Mar 2019 10:19:04 +0100 Subject: [PATCH] Uppity: fix a really obvious use-after-free. Oops! Fortunately, it's _only_ in Uppity. Must have written that code in a hell of a hurry to make that goof. --- sshserver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sshserver.c b/sshserver.c index 51bf2ff7..f1f6bc08 100644 --- a/sshserver.c +++ b/sshserver.c @@ -323,9 +323,10 @@ static void ssh_server_free_callback(void *vsrv) sfree(srv->gss_state.libs); /* FIXME: replace with sensible */ #endif + LogPolicy *lp = srv->logpolicy; sfree(srv); - server_instance_terminated(srv->logpolicy); + server_instance_terminated(lp); } static void server_connect_bpp(server *srv)