diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2017-02-28 06:10:09 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2017-02-28 06:10:09 +0000 |
commit | 9eda78306030571542c92dce577d75eefb571dee (patch) | |
tree | 1f1b06de475469673e1cacc48abcd47b4d670f6e /usr.bin/ssh/packet.c | |
parent | 2e1db635fc026e416c85e719b95d01580854e285 (diff) |
small memleak: free fd_set on connection timeout (though we are heading to
exit anyway). From Tom Rix in bz#2683
Diffstat (limited to 'usr.bin/ssh/packet.c')
-rw-r--r-- | usr.bin/ssh/packet.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c index f2ed6a527f9..4b87a808878 100644 --- a/usr.bin/ssh/packet.c +++ b/usr.bin/ssh/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.245 2017/02/03 23:03:33 djm Exp $ */ +/* $OpenBSD: packet.c,v 1.246 2017/02/28 06:10:08 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1454,8 +1454,10 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p) break; } } - if (r == 0) - return SSH_ERR_CONN_TIMEOUT; + if (r == 0) { + r = SSH_ERR_CONN_TIMEOUT; + goto out; + } /* Read data from the socket. */ len = read(state->connection_in, buf, sizeof(buf)); if (len == 0) { |