diff options
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include "includes.h" | 17 | #include "includes.h" |
18 | 18 | ||
19 | RCSID("$OpenBSD: sftp.c,v 1.57 2004/11/05 12:19:56 djm Exp $"); | 19 | RCSID("$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); |