X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/3394416cef1cce33c820cc00cbec2fc050bf189b..65857773290a7bacd6f5d84ab51a9c1228e61e99:/psftp.c diff --git a/psftp.c b/psftp.c index de1964e8..8dcee0e2 100644 --- a/psftp.c +++ b/psftp.c @@ -1866,7 +1866,7 @@ struct sftp_command *sftp_getcmd(FILE *fp, int mode, int modeflags) printf("psftp> "); line = fgetline(fp); } else { - line = ssh_sftp_get_cmdline("psftp> "); + line = ssh_sftp_get_cmdline("psftp> ", back == NULL); } if (!line || !*line) { @@ -2004,6 +2004,8 @@ void do_sftp_cleanup() sftp_recvdata(&ch, 1); back->free(backhandle); sftp_cleanup_request(); + back = NULL; + backhandle = NULL; } if (pwd) { sfree(pwd);