aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-11-27 20:18:25 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-11-27 22:53:53 +0100
commit1ee687ea6fd7f591f899af029c8c1b382c703dad (patch)
tree8860c17da88ddff3d533de7deac9c0086749bf17
parent73e1f2691f15c805d1df1ab71a90a026c33a1a4e (diff)
downloadlibssh-1ee687ea6fd7f591f899af029c8c1b382c703dad.tar.gz
libssh-1ee687ea6fd7f591f899af029c8c1b382c703dad.tar.xz
libssh-1ee687ea6fd7f591f899af029c8c1b382c703dad.zip
curve25519: Fix a memory leak.
CID #1125257
-rw-r--r--src/curve25519.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/curve25519.c b/src/curve25519.c
index 3cee2032..47c3cae9 100644
--- a/src/curve25519.c
+++ b/src/curve25519.c
@@ -65,8 +65,8 @@ int ssh_client_curve25519_init(ssh_session session){
ssh_string_fill(client_pubkey, session->next_crypto->curve25519_client_pubkey,
CURVE25519_PUBKEY_SIZE);
rc = buffer_add_ssh_string(session->out_buffer,client_pubkey);
+ ssh_string_free(client_pubkey);
if (rc < 0) {
- ssh_string_free(client_pubkey);
return SSH_ERROR;
}