mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 18:28:10 +09:00
Fix the free calls and use the safe free macro.
This commit is contained in:
@@ -968,7 +968,7 @@ int crypt_set_algorithms_server(SSH_SESSION *session){
|
|||||||
ssh_log(session,SSH_LOG_PACKET,"enabling C->S compression");
|
ssh_log(session,SSH_LOG_PACKET,"enabling C->S compression");
|
||||||
session->next_crypto->do_compress_in=1;
|
session->next_crypto->do_compress_in=1;
|
||||||
}
|
}
|
||||||
free(match);
|
SAFE_FREE(match);
|
||||||
|
|
||||||
client=session->client_kex.methods[SSH_CRYPT_S_C];
|
client=session->client_kex.methods[SSH_CRYPT_S_C];
|
||||||
server=session->server_kex.methods[SSH_CRYPT_S_C];
|
server=session->server_kex.methods[SSH_CRYPT_S_C];
|
||||||
@@ -977,7 +977,7 @@ int crypt_set_algorithms_server(SSH_SESSION *session){
|
|||||||
ssh_log(session,SSH_LOG_PACKET,"enabling S->C compression\n");
|
ssh_log(session,SSH_LOG_PACKET,"enabling S->C compression\n");
|
||||||
session->next_crypto->do_compress_out=1;
|
session->next_crypto->do_compress_out=1;
|
||||||
}
|
}
|
||||||
free(match);
|
SAFE_FREE(match);
|
||||||
|
|
||||||
server=session->server_kex.methods[SSH_HOSTKEYS];
|
server=session->server_kex.methods[SSH_HOSTKEYS];
|
||||||
client=session->client_kex.methods[SSH_HOSTKEYS];
|
client=session->client_kex.methods[SSH_HOSTKEYS];
|
||||||
@@ -989,11 +989,11 @@ int crypt_set_algorithms_server(SSH_SESSION *session){
|
|||||||
else {
|
else {
|
||||||
ssh_set_error(session, SSH_FATAL, "Cannot know what %s is into %s",
|
ssh_set_error(session, SSH_FATAL, "Cannot know what %s is into %s",
|
||||||
match ? match : NULL, server);
|
match ? match : NULL, server);
|
||||||
free(match);
|
SAFE_FREE(match);
|
||||||
leave_function();
|
leave_function();
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
free(match);
|
SAFE_FREE(match);
|
||||||
leave_function();
|
leave_function();
|
||||||
return SSH_OK;
|
return SSH_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user