diff options
author | 2003-03-05 22:33:43 +0000 | |
---|---|---|
committer | 2003-03-05 22:33:43 +0000 | |
commit | ce850b032b66ce5ec1fcf20b26e03ac295ba3db5 (patch) | |
tree | 299a43373b41c270a5c1399d2a1942948eed2ae7 /usr.bin/ssh/sftp-client.c | |
parent | delete blank lines (diff) | |
download | wireguard-openbsd-ce850b032b66ce5ec1fcf20b26e03ac295ba3db5.tar.xz wireguard-openbsd-ce850b032b66ce5ec1fcf20b26e03ac295ba3db5.zip |
fix memory leaks; from dlheine@suif.Stanford.EDU/CLOUSEAU; ok djm@
Diffstat (limited to 'usr.bin/ssh/sftp-client.c')
-rw-r--r-- | usr.bin/ssh/sftp-client.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/sftp-client.c b/usr.bin/ssh/sftp-client.c index dac54117b51..47935e76e2b 100644 --- a/usr.bin/ssh/sftp-client.c +++ b/usr.bin/ssh/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 <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) @@ -1109,6 +1110,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", |