diff options
author | Damien Miller <djm@mindrot.org> | 2008-02-10 22:23:41 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2008-02-10 22:23:41 +1100 |
commit | 6b0c818568b2650f519ee2dc9c685c313d802c1c (patch) | |
tree | a5810421e0b7b44a6447d3123fbfe27c6acde9d6 | |
parent | d39a3cffc907b54e69c3f607c1f0b74e931696fd (diff) |
- 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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sftp-client.c | 3 |
2 files changed, 7 insertions, 2 deletions
@@ -19,6 +19,10 @@ | |||
19 | ignore SIGPIPE in multiplex client mode - we can receive this if the | 19 | ignore SIGPIPE in multiplex client mode - we can receive this if the |
20 | server runs out of fds on us midway. Report and patch from | 20 | server runs out of fds on us midway. Report and patch from |
21 | gregory_shively AT fanniemae.com | 21 | gregory_shively AT fanniemae.com |
22 | - djm@cvs.openbsd.org 2008/01/19 22:04:57 | ||
23 | [sftp-client.c] | ||
24 | fix remote handle leak in do_download() local file open error path; | ||
25 | report and fix from sworley AT chkno.net | ||
22 | 26 | ||
23 | 20080119 | 27 | 20080119 |
24 | - (djm) Silence noice from expr in ssh-copy-id; patch from | 28 | - (djm) Silence noice from expr in ssh-copy-id; patch from |
@@ -3547,4 +3551,4 @@ | |||
3547 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 3551 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
3548 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 3552 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
3549 | 3553 | ||
3550 | $Id: ChangeLog,v 1.4823 2008/02/10 11:23:18 djm Exp $ | 3554 | $Id: ChangeLog,v 1.4824 2008/02/10 11:23:41 djm Exp $ |
diff --git a/sftp-client.c b/sftp-client.c index 7df46379c..e8cdb96ac 100644 --- a/sftp-client.c +++ b/sftp-client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp-client.c,v 1.78 2008/01/11 07:22:27 chl Exp $ */ | 1 | /* $OpenBSD: sftp-client.c,v 1.79 2008/01/19 22:04:57 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -823,6 +823,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, | |||
823 | if (local_fd == -1) { | 823 | if (local_fd == -1) { |
824 | error("Couldn't open local file \"%s\" for writing: %s", | 824 | error("Couldn't open local file \"%s\" for writing: %s", |
825 | local_path, strerror(errno)); | 825 | local_path, strerror(errno)); |
826 | do_close(conn, handle, handle_len); | ||
826 | buffer_free(&msg); | 827 | buffer_free(&msg); |
827 | xfree(handle); | 828 | xfree(handle); |
828 | return(-1); | 829 | return(-1); |