aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2012-02-04 20:44:04 +0100
committerAndreas Schneider <asn@cryptomilk.org>2012-02-04 21:06:11 +0100
commit4223c8a1166d2d155fc824b2881724a92c39461d (patch)
treee3b16d6435a1c4dd6ea76b562b2ac8fc43a98e96
parente4d0ac7ba1cfa0caf63f749e43a6de739a82634b (diff)
downloadlibssh-4223c8a1166d2d155fc824b2881724a92c39461d.tar.gz
libssh-4223c8a1166d2d155fc824b2881724a92c39461d.tar.xz
libssh-4223c8a1166d2d155fc824b2881724a92c39461d.zip
ecdh: Fix a memory leak in ssh_server_ecdh_init().
Thanks to Tom Judge for the report.
-rw-r--r--src/ecdh.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ecdh.c b/src/ecdh.c
index 9583473..b0fd212 100644
--- a/src/ecdh.c
+++ b/src/ecdh.c
@@ -239,6 +239,7 @@ int ssh_server_ecdh_init(ssh_session session, ssh_buffer packet){
goto error;
}
buffer_add_ssh_string(session->out_buffer, sig_blob);
+ ssh_string_free(sig_blob);
/* Free private keys as they should not be readable after this point */
if (session->srv.rsa_key) {
ssh_key_free(session->srv.rsa_key);