diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | sftp-client.c | 4 |
2 files changed, 7 insertions, 1 deletions
@@ -39,6 +39,10 @@ | |||
39 | Loganaden Velvindron @ AfriNIC | 39 | Loganaden Velvindron @ AfriNIC |
40 | 40 | ||
41 | Also make it a memset for consistency with the rest of cipher.c | 41 | Also make it a memset for consistency with the rest of cipher.c |
42 | - djm@cvs.openbsd.org 2013/12/04 04:20:01 | ||
43 | [sftp-client.c] | ||
44 | bz#2171: don't leak local_fd on error; from Loganaden Velvindron @ | ||
45 | AfriNIC | ||
42 | 46 | ||
43 | 20131121 | 47 | 20131121 |
44 | - (djm) OpenBSD CVS Sync | 48 | - (djm) OpenBSD CVS Sync |
diff --git a/sftp-client.c b/sftp-client.c index 9ecded04b..246e94982 100644 --- a/sftp-client.c +++ b/sftp-client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp-client.c,v 1.109 2013/11/08 11:15:19 dtucker Exp $ */ | 1 | /* $OpenBSD: sftp-client.c,v 1.110 2013/12/04 04:20:01 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 | * |
@@ -1111,6 +1111,8 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, | |||
1111 | do_close(conn, handle, handle_len); | 1111 | do_close(conn, handle, handle_len); |
1112 | buffer_free(&msg); | 1112 | buffer_free(&msg); |
1113 | free(handle); | 1113 | free(handle); |
1114 | if (local_fd != -1) | ||
1115 | close(local_fd); | ||
1114 | return -1; | 1116 | return -1; |
1115 | } | 1117 | } |
1116 | offset = highwater = st.st_size; | 1118 | offset = highwater = st.st_size; |