Fix use-without-initialization
Этот коммит содержится в:
родитель
8d1faa0dbc
Коммит
b361fb5898
@ -366,7 +366,7 @@ int ssh_get_version(ssh_session session) {
|
||||
*/
|
||||
SSH_PACKET_CALLBACK(ssh_packet_disconnect_callback){
|
||||
uint32_t code;
|
||||
char *error;
|
||||
char *error=NULL;
|
||||
ssh_string error_s;
|
||||
(void)user;
|
||||
(void)type;
|
||||
@ -376,9 +376,11 @@ SSH_PACKET_CALLBACK(ssh_packet_disconnect_callback){
|
||||
error = string_to_char(error_s);
|
||||
string_free(error_s);
|
||||
}
|
||||
ssh_log(session, SSH_LOG_PACKET, "Received SSH_MSG_DISCONNECT %d:%s",code,error);
|
||||
ssh_log(session, SSH_LOG_PACKET, "Received SSH_MSG_DISCONNECT %d:%s",code,
|
||||
error != NULL ? error : "no error");
|
||||
ssh_set_error(session, SSH_FATAL,
|
||||
"Received SSH_MSG_DISCONNECT: %d:%s",code,error);
|
||||
"Received SSH_MSG_DISCONNECT: %d:%s",code,
|
||||
error != NULL ? error : "no error");
|
||||
SAFE_FREE(error);
|
||||
|
||||
ssh_socket_close(session->socket);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user