[openssh-commits] [openssh] 03/06: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Sun Oct 25 11:42:17 AEDT 2015


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 66d2e229baa9fe57b868c373b05f7ff3bb20055b
Author: gsoares at openbsd.org <gsoares at openbsd.org>
Date:   Wed Oct 21 11:33:03 2015 +0000

    upstream commit
    
    fix memory leak in error path ok djm@
    
    Upstream-ID: dd2f402b0a0029b755df029fc7f0679e1365ce35
---
 packet.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/packet.c b/packet.c
index 9cf09e2..a0dbc23 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.215 2015/09/21 04:31:00 djm Exp $ */
+/* $OpenBSD: packet.c,v 1.216 2015/10/21 11:33:03 gsoares Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -2040,8 +2040,10 @@ ssh_packet_write_wait(struct ssh *ssh)
 	    NFDBITS), sizeof(fd_mask));
 	if (setp == NULL)
 		return SSH_ERR_ALLOC_FAIL;
-	if ((r = ssh_packet_write_poll(ssh)) != 0)
+	if ((r = ssh_packet_write_poll(ssh)) != 0) {
+		free(setp);
 		return r;
+	}
 	while (ssh_packet_have_data_to_write(ssh)) {
 		memset(setp, 0, howmany(state->connection_out + 1,
 		    NFDBITS) * sizeof(fd_mask));

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list