summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-12-06 22:43:43 +1100
committerDarren Tucker <dtucker@zip.com.au>2004-12-06 22:43:43 +1100
commitcd516efea147ef64f0b3d0be3e3c94b450c11c24 (patch)
tree7515974a224efd9ede84cc269493a1390fa6837b
parentba2abb3699d5901898041dad45394e47de891cc9 (diff)
- (dtucker) OpenBSD CVS Sync
- markus@cvs.openbsd.org 2004/11/25 22:22:14 [sftp-client.c sftp.c] leak; from mpech
-rw-r--r--ChangeLog6
-rw-r--r--sftp-client.c4
-rw-r--r--sftp.c7
3 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 11f7bbd87..f80f685de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
120041206 120041206
2 - (dtucker) [TODO WARNING.RNG] Update to reflect current reality. ok djm@ 2 - (dtucker) [TODO WARNING.RNG] Update to reflect current reality. ok djm@
3 - (dtucker) OpenBSD CVS Sync
4 - markus@cvs.openbsd.org 2004/11/25 22:22:14
5 [sftp-client.c sftp.c]
6 leak; from mpech
3 7
420041203 820041203
5 - (dtucker) OpenBSD CVS Sync 9 - (dtucker) OpenBSD CVS Sync
@@ -1873,4 +1877,4 @@
1873 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 1877 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
1874 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 1878 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
1875 1879
1876$Id: ChangeLog,v 1.3585 2004/12/06 11:40:10 dtucker Exp $ 1880$Id: ChangeLog,v 1.3586 2004/12/06 11:43:43 dtucker Exp $
diff --git a/sftp-client.c b/sftp-client.c
index 0ffacbccc..d894a11f2 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -20,7 +20,7 @@
20/* XXX: copy between two remote sites */ 20/* XXX: copy between two remote sites */
21 21
22#include "includes.h" 22#include "includes.h"
23RCSID("$OpenBSD: sftp-client.c,v 1.51 2004/07/11 17:48:47 deraadt Exp $"); 23RCSID("$OpenBSD: sftp-client.c,v 1.52 2004/11/25 22:22:14 markus Exp $");
24 24
25#include "openbsd-compat/sys-queue.h" 25#include "openbsd-compat/sys-queue.h"
26 26
@@ -172,6 +172,7 @@ get_handle(int fd, u_int expected_id, u_int *len)
172 int status = buffer_get_int(&msg); 172 int status = buffer_get_int(&msg);
173 173
174 error("Couldn't get handle: %s", fx2txt(status)); 174 error("Couldn't get handle: %s", fx2txt(status));
175 buffer_free(&msg);
175 return(NULL); 176 return(NULL);
176 } else if (type != SSH2_FXP_HANDLE) 177 } else if (type != SSH2_FXP_HANDLE)
177 fatal("Expected SSH2_FXP_HANDLE(%u) packet, got %u", 178 fatal("Expected SSH2_FXP_HANDLE(%u) packet, got %u",
@@ -206,6 +207,7 @@ get_decode_stat(int fd, u_int expected_id, int quiet)
206 debug("Couldn't stat remote file: %s", fx2txt(status)); 207 debug("Couldn't stat remote file: %s", fx2txt(status));
207 else 208 else
208 error("Couldn't stat remote file: %s", fx2txt(status)); 209 error("Couldn't stat remote file: %s", fx2txt(status));
210 buffer_free(&msg);
209 return(NULL); 211 return(NULL);
210 } else if (type != SSH2_FXP_ATTRS) { 212 } else if (type != SSH2_FXP_ATTRS) {
211 fatal("Expected SSH2_FXP_ATTRS(%u) packet, got %u", 213 fatal("Expected SSH2_FXP_ATTRS(%u) packet, got %u",
diff --git a/sftp.c b/sftp.c
index 2db394e23..b37c36b71 100644
--- a/sftp.c
+++ b/sftp.c
@@ -16,7 +16,7 @@
16 16
17#include "includes.h" 17#include "includes.h"
18 18
19RCSID("$OpenBSD: sftp.c,v 1.57 2004/11/05 12:19:56 djm Exp $"); 19RCSID("$OpenBSD: sftp.c,v 1.58 2004/11/25 22:22:14 markus Exp $");
20 20
21#ifdef USE_LIBEDIT 21#ifdef USE_LIBEDIT
22#include <histedit.h> 22#include <histedit.h>
@@ -1265,8 +1265,11 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2)
1265 if (remote_is_dir(conn, dir) && file2 == NULL) { 1265 if (remote_is_dir(conn, dir) && file2 == NULL) {
1266 printf("Changing to: %s\n", dir); 1266 printf("Changing to: %s\n", dir);
1267 snprintf(cmd, sizeof cmd, "cd \"%s\"", dir); 1267 snprintf(cmd, sizeof cmd, "cd \"%s\"", dir);
1268 if (parse_dispatch_command(conn, cmd, &pwd, 1) != 0) 1268 if (parse_dispatch_command(conn, cmd, &pwd, 1) != 0) {
1269 xfree(dir);
1270 xfree(pwd);
1269 return (-1); 1271 return (-1);
1272 }
1270 } else { 1273 } else {
1271 if (file2 == NULL) 1274 if (file2 == NULL)
1272 snprintf(cmd, sizeof cmd, "get %s", dir); 1275 snprintf(cmd, sizeof cmd, "get %s", dir);