- 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
diff --git a/ChangeLog b/ChangeLog
index a7fd1d0..2d3ec03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,10 @@
Loganaden Velvindron @ AfriNIC
Also make it a memset for consistency with the rest of cipher.c
+ - 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
20131121
- (djm) OpenBSD CVS Sync
diff --git a/sftp-client.c b/sftp-client.c
index 9ecded0..246e949 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_close(conn, handle, handle_len);
buffer_free(&msg);
free(handle);
+ if (local_fd != -1)
+ close(local_fd);
return -1;
}
offset = highwater = st.st_size;