- Merge fix from OpenBSD CVS

[ssh-agent.c]
  - Fix memory leak per connection. Report from Andy Spiegl <Andy@Spiegl.de>
    via Debian bug #59926
This commit is contained in:
Damien Miller 2000-04-21 15:55:20 +10:00
parent f3a3fee942
commit a552faf564
2 changed files with 12 additions and 2 deletions

View File

@ -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>

View File

@ -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);