diff options
author | Damien Miller <djm@mindrot.org> | 2013-12-05 00:26:32 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-12-05 00:26:32 +0100 |
commit | 9275df3e0a2a3bc3897f7d664ea86a425c8a092d (patch) | |
tree | 19ce14c8e483e8ebee28a97d35f434d3c7f321f2 /sftp-client.c | |
parent | - djm@cvs.openbsd.org 2013/12/02 03:13:14 (diff) | |
download | openssh-9275df3e0a2a3bc3897f7d664ea86a425c8a092d.tar.xz openssh-9275df3e0a2a3bc3897f7d664ea86a425c8a092d.zip |
- djm@cvs.openbsd.org 2013/12/04 04:20:01
[sftp-client.c]
bz#2171: don't leak local_fd on error; from Loganaden Velvindron @
AfriNIC
Diffstat (limited to 'sftp-client.c')
-rw-r--r-- | sftp-client.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ -/* $OpenBSD: sftp-client.c,v 1.109 2013/11/08 11:15:19 dtucker Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.110 2013/12/04 04:20:01 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> * @@ -1111,6 +1111,8 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, do_close(conn, handle, handle_len); buffer_free(&msg); free(handle); + if (local_fd != -1) + close(local_fd); return -1; } offset = highwater = st.st_size; |