From 7a56a270d6c8432a50e50000b5a2989c1634c1b1 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 21 Apr 2000 00:27:12 +0000 Subject: Fix memory leak per connection. Report from Andy Spiegl via Debian bug #59926 --- usr.bin/ssh/ssh-agent.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'usr.bin/ssh/ssh-agent.c') diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c index 39ff3e533e6..17f8d70de09 100644 --- a/usr.bin/ssh/ssh-agent.c +++ b/usr.bin/ssh/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 @@ -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" @@ -436,6 +436,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); @@ -446,6 +448,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); -- cgit v1.2.3