]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/blobdiff - pscp.c
Fix a couple of code paths on which, if fxp_readdir returned an error,
[PuTTY_svn.git] / pscp.c
diff --git a/pscp.c b/pscp.c
index 0dbe1e34e7bad95e4ff71ea3280cc95dffb8c101..4c6aba73c05a514a0637c3dc1f26dd42b09ccd2f 100644 (file)
--- a/pscp.c
+++ b/pscp.c
@@ -1348,6 +1348,11 @@ int scp_get_sink_action(struct scp_sink_action *act)
                        break;
                    tell_user(stderr, "scp: reading directory %s: %s\n",
                              fname, fxp_error());
+
+                    req = fxp_close_send(dirhandle);
+                    pktin = sftp_wait_for_reply(req);
+                    fxp_close_recv(pktin, req);
+
                    if (must_free_fname) sfree(fname);
                    sfree(ournames);
                    errs++;