[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] session: fix ssh_session->srv.ecdsa_key leak
[Thread Prev] | [Thread Next]
- Subject: [PATCH] session: fix ssh_session->srv.ecdsa_key leak
- From: Jon Simons <jon@xxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Fri, 23 May 2014 13:23:50 -0700
- To: libssh@xxxxxxxxxx
Attached is a leak fix for the 'srv.ecdsa_key' field in ssh_session. Thanks, -Jon
From a4d6c08055846149edd495b92629a6a0e3e35758 Mon Sep 17 00:00:00 2001 From: Jon Simons <jon@xxxxxxxxxxxxx> Date: Fri, 23 May 2014 13:15:34 -0700 Subject: [PATCH] session: fix ssh_session->srv.ecdsa_key leak Signed-off-by: Jon Simons <jon@xxxxxxxxxxxxx> --- src/session.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/session.c b/src/session.c index 3a0a90d..78e0c8a 100644 --- a/src/session.c +++ b/src/session.c @@ -226,7 +226,11 @@ void ssh_free(ssh_session session) { #endif /* _WIN32 */ ssh_key_free(session->srv.dsa_key); + session->srv.dsa_key = NULL; ssh_key_free(session->srv.rsa_key); + session->srv.rsa_key = NULL; + ssh_key_free(session->srv.ecdsa_key); + session->srv.ecdsa_key = NULL; if (session->ssh_message_list) { ssh_message msg; -- 1.9.1
Re: [PATCH] session: fix ssh_session->srv.ecdsa_key leak | Andreas Schneider <asn@xxxxxxxxxxxxxx> |