1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

Fix bugs found by clang

This commit is contained in:
Aris Adamantiadis
2011-09-23 22:27:46 +02:00
parent 8a3b02f68d
commit 046aa02f39
4 changed files with 9 additions and 2 deletions

View File

@@ -966,6 +966,10 @@ int ssh_userauth_agent(ssh_session session,
}
if (!session->agent_state){
session->agent_state = malloc(sizeof(struct ssh_agent_state_struct));
if (!session->agent_state){
ssh_set_error_oom(session);
return SSH_AUTH_ERROR;
}
ZERO_STRUCTP(session->agent_state);
session->agent_state->state=SSH_AGENT_STATE_NONE;
}