1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-10 06:23:01 +03:00

Add NULL check for agent_free().

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@382 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Andreas Schneider
2009-04-03 12:52:34 +00:00
parent b5eb33bb69
commit 0e82ddbd81

View File

@@ -136,6 +136,10 @@ AGENT *agent_new(struct ssh_session *session) {
}
void agent_close(struct agent_struct *agent) {
if (agent == NULL) {
return;
}
if (getenv("SSH_AUTH_SOCK")) {
ssh_socket_close(agent->sock);
}