]> andersk Git - openssh.git/blobdiff - sftp.c
- (dtucker) OpenBSD CVS Sync
[openssh.git] / sftp.c
diff --git a/sftp.c b/sftp.c
index 2db394e23fa77aa7578a0be12a6448bea8434df5..b37c36b715fa20b7473d23e49c8b73c352330c69 100644 (file)
--- a/sftp.c
+++ b/sftp.c
@@ -16,7 +16,7 @@
 
 #include "includes.h"
 
-RCSID("$OpenBSD: sftp.c,v 1.57 2004/11/05 12:19:56 djm Exp $");
+RCSID("$OpenBSD: sftp.c,v 1.58 2004/11/25 22:22:14 markus Exp $");
 
 #ifdef USE_LIBEDIT
 #include <histedit.h>
@@ -1265,8 +1265,11 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2)
                if (remote_is_dir(conn, dir) && file2 == NULL) {
                        printf("Changing to: %s\n", dir);
                        snprintf(cmd, sizeof cmd, "cd \"%s\"", dir);
-                       if (parse_dispatch_command(conn, cmd, &pwd, 1) != 0)
+                       if (parse_dispatch_command(conn, cmd, &pwd, 1) != 0) {
+                               xfree(dir);
+                               xfree(pwd);
                                return (-1);
+                       }
                } else {
                        if (file2 == NULL)
                                snprintf(cmd, sizeof cmd, "get %s", dir);
This page took 0.032458 seconds and 4 git commands to generate.