summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-04-21 15:55:20 +1000
committerDamien Miller <djm@mindrot.org>2000-04-21 15:55:20 +1000
commita552faf5646498c12acfd752394e289e4f9a226d (patch)
treea40be5aabf692814274559c7f8f89d831e94ff7e
parentf3a3fee942427289ed9db73f2db1624c30d0f76f (diff)
- Merge fix from OpenBSD CVS
[ssh-agent.c] - Fix memory leak per connection. Report from Andy Spiegl <Andy@Spiegl.de> via Debian bug #59926
-rw-r--r--ChangeLog6
-rw-r--r--ssh-agent.c8
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c8e2d70d..cb810c94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+20000421
+ - Merge fix from OpenBSD CVS
+ [ssh-agent.c]
+ - Fix memory leak per connection. Report from Andy Spiegl <Andy@Spiegl.de>
+ via Debian bug #59926
+
20000420
- Make fixpaths work with perl4, patch from Andre Lucas
<andre.lucas@dial.pipex.com>
diff --git a/ssh-agent.c b/ssh-agent.c
index c9a84a4a..fb13ce7e 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.29 2000/04/19 07:05:49 deraadt Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.30 2000/04/21 00:27:11 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -9,7 +9,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-agent.c,v 1.29 2000/04/19 07:05:49 deraadt Exp $");
+RCSID("$OpenBSD: ssh-agent.c,v 1.30 2000/04/21 00:27:11 djm Exp $");
#include "ssh.h"
#include "rsa.h"
@@ -440,6 +440,8 @@ after_select(fd_set *readset, fd_set *writeset)
shutdown(sockets[i].fd, SHUT_RDWR);
close(sockets[i].fd);
sockets[i].type = AUTH_UNUSED;
+ buffer_free(&sockets[i].input);
+ buffer_free(&sockets[i].output);
break;
}
buffer_consume(&sockets[i].output, len);
@@ -450,6 +452,8 @@ after_select(fd_set *readset, fd_set *writeset)
shutdown(sockets[i].fd, SHUT_RDWR);
close(sockets[i].fd);
sockets[i].type = AUTH_UNUSED;
+ buffer_free(&sockets[i].input);
+ buffer_free(&sockets[i].output);
break;
}
buffer_append(&sockets[i].input, buf, len);