summaryrefslogtreecommitdiff
path: root/sftp-client.c
diff options
context:
space:
mode:
authordjm <djm>2003-03-10 00:21:17 +0000
committerdjm <djm>2003-03-10 00:21:17 +0000
commit3ba86eded8425021ac67500800d3e6acfc124378 (patch)
tree900aa245783826640df4f44bff5bbfd1df00b57e /sftp-client.c
parent04bb527abc4bc08309889dc72a46c44258ca206b (diff)
downloadopenssh-3ba86eded8425021ac67500800d3e6acfc124378.tar.gz
- (djm) OpenBSD CVS Sync
- markus@cvs.openbsd.org 2003/03/05 22:33:43 [channels.c monitor.c scp.c session.c sftp-client.c sftp-int.c] [sftp-server.c ssh-add.c sshconnect2.c] fix memory leaks; from dlheine@suif.Stanford.EDU/CLOUSEAU; ok djm@
Diffstat (limited to 'sftp-client.c')
-rw-r--r--sftp-client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sftp-client.c b/sftp-client.c
index 8c12dae1..3b3279e6 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.41 2003/01/14 10:58:00 djm Exp $");
+RCSID("$OpenBSD: sftp-client.c,v 1.42 2003/03/05 22:33:43 markus Exp $");
#include "openbsd-compat/sys-queue.h"
@@ -374,6 +374,7 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int printflag,
error("Couldn't read directory: %s",
fx2txt(status));
do_close(conn, handle, handle_len);
+ xfree(handle);
return(status);
}
} else if (type != SSH2_FXP_NAME)
@@ -1113,6 +1114,8 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
remote_path, fx2txt(status));
do_close(conn, handle, handle_len);
close(local_fd);
+ xfree(data);
+ xfree(ack);
goto done;
}
debug3("In write loop, ack for %u %u bytes at %llu",