diff --git a/src/messages.c b/src/messages.c index 8e88bcc3..b73aecd8 100644 --- a/src/messages.c +++ b/src/messages.c @@ -715,7 +715,7 @@ static ssh_buffer ssh_msg_userauth_build_digest(ssh_session session, ssh_string_get_char(algo), /* pubkey algorithm */ str); /* public key as a blob */ - ssh_string_free(str); + SSH_STRING_FREE(str); if (rc != SSH_OK) { ssh_set_error_oom(session); ssh_buffer_free(buffer); @@ -800,7 +800,7 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_request){ * 3.1. Initial Exchange * "The language tag is deprecated and SHOULD be the empty string." */ - ssh_string_free(lang); + SSH_STRING_FREE(lang); submethods = ssh_buffer_get_ssh_string(packet); if (submethods == NULL) { @@ -812,7 +812,7 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_request){ * server is that, unless the user may use multiple different * submethods, the server ignores this field." */ - ssh_string_free(submethods); + SSH_STRING_FREE(submethods); goto end; } @@ -835,10 +835,10 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_request){ } rc = ssh_pki_import_pubkey_blob(pubkey_blob, &msg->auth_request.pubkey); - ssh_string_free(pubkey_blob); + SSH_STRING_FREE(pubkey_blob); pubkey_blob = NULL; if (rc < 0) { - ssh_string_free(algo); + SSH_STRING_FREE(algo); algo = NULL; goto error; } @@ -852,16 +852,16 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_request){ if(sig_blob == NULL) { SSH_LOG(SSH_LOG_PACKET, "Invalid signature packet from peer"); msg->auth_request.signature_state = SSH_PUBLICKEY_STATE_ERROR; - ssh_string_free(algo); + SSH_STRING_FREE(algo); algo = NULL; goto error; } digest = ssh_msg_userauth_build_digest(session, msg, service, algo); - ssh_string_free(algo); + SSH_STRING_FREE(algo); algo = NULL; if (digest == NULL) { - ssh_string_free(sig_blob); + SSH_STRING_FREE(sig_blob); SSH_LOG(SSH_LOG_PACKET, "Failed to get digest"); msg->auth_request.signature_state = SSH_PUBLICKEY_STATE_WRONG; goto error; @@ -894,7 +894,7 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_request){ ssh_buffer_get_len(digest)); } } - ssh_string_free(sig_blob); + SSH_STRING_FREE(sig_blob); ssh_buffer_free(digest); ssh_signature_free(sig); if (rc < 0) { @@ -909,7 +909,7 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_request){ msg->auth_request.signature_state = SSH_PUBLICKEY_STATE_VALID; } - ssh_string_free(algo); + SSH_STRING_FREE(algo); goto end; } #ifdef WITH_GSSAPI @@ -1097,7 +1097,7 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_info_response){ goto error; } session->kbdint->answers[i] = ssh_string_to_char(tmp); - ssh_string_free(tmp); + SSH_STRING_FREE(tmp); if (session->kbdint->answers[i] == NULL) { ssh_set_error_oom(session); session->kbdint->nanswers = i;