aboutsummaryrefslogtreecommitdiff
path: root/src/agent.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-07-14 14:51:53 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-07-14 15:02:11 +0200
commit22e88581346acfe0360cf6efebba3ed0c2842d01 (patch)
tree8d6971559686bf6126c046c3d3cf7f7f4643eb60 /src/agent.c
parent483ba8100ff22f4d83107af611b21854b2bdabc2 (diff)
downloadlibssh-22e88581346acfe0360cf6efebba3ed0c2842d01.tar.gz
libssh-22e88581346acfe0360cf6efebba3ed0c2842d01.tar.xz
libssh-22e88581346acfe0360cf6efebba3ed0c2842d01.zip
agent: Fix possible segfaults due to NULL pointer deref.
CID #1035578
Diffstat (limited to 'src/agent.c')
-rw-r--r--src/agent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/agent.c b/src/agent.c
index 18b6bb78..1f7454e6 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -334,11 +334,11 @@ int ssh_agent_get_ident_count(struct ssh_session_struct *session) {
/* send message to the agent requesting the list of identities */
request = ssh_buffer_new();
if (request == NULL) {
- ssh_set_error_oom(request);
+ ssh_set_error_oom(session);
return -1;
}
if (buffer_add_u8(request, c1) < 0) {
- ssh_set_error_oom(request);
+ ssh_set_error_oom(session);
ssh_buffer_free(request);
return -1;
}