summaryrefslogtreecommitdiffstats
path: root/src/auth.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2011-09-23 22:27:46 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2011-09-23 22:27:46 +0200
commit046aa02f39947fff16dff6cfe6db6dcf53fb6d96 (patch)
tree765228347e3217fe5fc5f8bfb445151132508c9d /src/auth.c
parent8a3b02f68dad8f5dd2f236e26d44dd67b3597be4 (diff)
downloadlibssh-046aa02f39947fff16dff6cfe6db6dcf53fb6d96.tar.gz
libssh-046aa02f39947fff16dff6cfe6db6dcf53fb6d96.tar.xz
libssh-046aa02f39947fff16dff6cfe6db6dcf53fb6d96.zip
Fix bugs found by clang
Diffstat (limited to 'src/auth.c')
-rw-r--r--src/auth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/auth.c b/src/auth.c
index 8ab80ee..b4b17eb 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -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;
}