aboutsummaryrefslogtreecommitdiff
path: root/modules/csync_sftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/csync_sftp.c')
-rw-r--r--modules/csync_sftp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/csync_sftp.c b/modules/csync_sftp.c
index adae541..edfec72 100644
--- a/modules/csync_sftp.c
+++ b/modules/csync_sftp.c
@@ -282,6 +282,7 @@ static int _sftp_connect(const char *uri) {
rc = ssh_get_publickey_hash(srv_pubkey,
SSH_PUBLICKEY_HASH_SHA1,
&hash, &hlen);
+ ssh_key_free(srv_pubkey);
if (rc < 0) {
fprintf(stderr, "csync_sftp - error connecting to the server: %s\n",
ssh_get_error(_ssh_session));
@@ -536,7 +537,7 @@ out:
SAFE_FREE(user);
SAFE_FREE(passwd);
SAFE_FREE(host);
- SAFE_FREE(hash);
+ ssh_clean_pubkey_hash(&hash);
return rc;
}