summaryrefslogtreecommitdiffstats
path: root/libssh/agent.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/agent.c')
-rw-r--r--libssh/agent.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libssh/agent.c b/libssh/agent.c
index 3a8c56ee..8a938907 100644
--- a/libssh/agent.c
+++ b/libssh/agent.c
@@ -124,6 +124,9 @@ AGENT *agent_new(struct ssh_session *session) {
if (agent) {
agent->count = 0;
agent->sock = ssh_socket_new(session);
+ if (agent->sock == NULL) {
+ return NULL;
+ }
}
return agent;