From: djm Date: Sun, 10 Feb 2008 11:23:41 +0000 (+0000) Subject: - djm@cvs.openbsd.org 2008/01/19 22:04:57 X-Git-Tag: V_4_9_P1~78 X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/commitdiff_plain/1c861236d164f3e4f904341e4ad5234e23b6a00b - djm@cvs.openbsd.org 2008/01/19 22:04:57 [sftp-client.c] fix remote handle leak in do_download() local file open error path; report and fix from sworley AT chkno.net --- diff --git a/ChangeLog b/ChangeLog index bcb75537..9eae86fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,10 @@ ignore SIGPIPE in multiplex client mode - we can receive this if the server runs out of fds on us midway. Report and patch from gregory_shively AT fanniemae.com + - djm@cvs.openbsd.org 2008/01/19 22:04:57 + [sftp-client.c] + fix remote handle leak in do_download() local file open error path; + report and fix from sworley AT chkno.net 20080119 - (djm) Silence noice from expr in ssh-copy-id; patch from diff --git a/sftp-client.c b/sftp-client.c index 7df46379..e8cdb96a 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.78 2008/01/11 07:22:27 chl Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.79 2008/01/19 22:04:57 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -823,6 +823,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, if (local_fd == -1) { error("Couldn't open local file \"%s\" for writing: %s", local_path, strerror(errno)); + do_close(conn, handle, handle_len); buffer_free(&msg); xfree(handle); return(-1);