diff options
author | mouring <mouring> | 2002-02-26 18:02:43 +0000 |
---|---|---|
committer | mouring <mouring> | 2002-02-26 18:02:43 +0000 |
commit | 246969995f3e87c93c42437912e9d949eef55885 (patch) | |
tree | 778d2669cd85bc50577878e46dfae40e87561a98 /sftp-client.c | |
parent | 73a459e64ef9c583de9daf13950dbec99cc35c86 (diff) | |
download | openssh-246969995f3e87c93c42437912e9d949eef55885.tar.gz |
- markus@cvs.openbsd.org 2002/02/24 16:57:19
[sftp-client.c]
early close(), missing free; ok stevesk@
Diffstat (limited to 'sftp-client.c')
-rw-r--r-- | sftp-client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sftp-client.c b/sftp-client.c index 481341c6..17ac14a9 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -28,7 +28,7 @@ /* XXX: copy between two remote sites */ #include "includes.h" -RCSID("$OpenBSD: sftp-client.c,v 1.23 2002/02/13 00:59:23 djm Exp $"); +RCSID("$OpenBSD: sftp-client.c,v 1.24 2002/02/24 16:57:19 markus Exp $"); #if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H) #include <sys/queue.h> @@ -799,7 +799,6 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, handle = get_handle(conn->fd_in, id, &handle_len); if (handle == NULL) { buffer_free(&msg); - close(local_fd); return(-1); } @@ -807,6 +806,8 @@ 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)); + buffer_free(&msg); + xfree(handle); return(-1); } |