aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2019-10-28 13:49:51 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-12-09 16:08:03 +0100
commit45ee89232724bd7f6375fec9461d2e23b9df5d18 (patch)
treed069bf93ca76018154f8ee56d869e633da2a4ed7 /src
parent321b27b788561b6bb9c2c10388c5307e7db66940 (diff)
downloadlibssh-45ee89232724bd7f6375fec9461d2e23b9df5d18.tar.gz
libssh-45ee89232724bd7f6375fec9461d2e23b9df5d18.tar.xz
libssh-45ee89232724bd7f6375fec9461d2e23b9df5d18.zip
agent: Use SSH_STRING_FREE()
Fixes T183 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/agent.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/agent.c b/src/agent.c
index 4c297be4..8b38f452 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -425,7 +425,7 @@ ssh_key ssh_agent_get_next_ident(struct ssh_session_struct *session,
/* get the comment */
tmp = ssh_buffer_get_ssh_string(session->agent->ident);
if (tmp == NULL) {
- ssh_string_free(blob);
+ SSH_STRING_FREE(blob);
return NULL;
}
@@ -433,12 +433,12 @@ ssh_key ssh_agent_get_next_ident(struct ssh_session_struct *session,
if (comment) {
*comment = ssh_string_to_char(tmp);
} else {
- ssh_string_free(blob);
- ssh_string_free(tmp);
+ SSH_STRING_FREE(blob);
+ SSH_STRING_FREE(tmp);
return NULL;
}
- ssh_string_free(tmp);
+ SSH_STRING_FREE(tmp);
/* get key from blob */
rc = ssh_pki_import_pubkey_blob(blob, &key);
@@ -446,7 +446,7 @@ ssh_key ssh_agent_get_next_ident(struct ssh_session_struct *session,
/* Try again as a cert. */
rc = ssh_pki_import_cert_blob(blob, &key);
}
- ssh_string_free(blob);
+ SSH_STRING_FREE(blob);
if (rc == SSH_ERROR) {
return NULL;
}
@@ -519,7 +519,7 @@ ssh_string ssh_agent_sign_data(ssh_session session,
/* adds len + blob */
rc = ssh_buffer_add_ssh_string(request, key_blob);
- ssh_string_free(key_blob);
+ SSH_STRING_FREE(key_blob);
if (rc < 0) {
ssh_buffer_free(request);
return NULL;