mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
Fix a couple of code paths on which, if fxp_readdir returned an error,
we would return without first closing the directory handle we had used as an argument. [originally from svn r9913]
This commit is contained in:
parent
779466f0b0
commit
f78c9165a1
5
pscp.c
5
pscp.c
@ -1348,6 +1348,11 @@ int scp_get_sink_action(struct scp_sink_action *act)
|
|||||||
break;
|
break;
|
||||||
tell_user(stderr, "scp: reading directory %s: %s\n",
|
tell_user(stderr, "scp: reading directory %s: %s\n",
|
||||||
fname, fxp_error());
|
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);
|
if (must_free_fname) sfree(fname);
|
||||||
sfree(ournames);
|
sfree(ournames);
|
||||||
errs++;
|
errs++;
|
||||||
|
5
psftp.c
5
psftp.c
@ -291,6 +291,11 @@ int sftp_get_file(char *fname, char *outfname, int recurse, int restart)
|
|||||||
if (fxp_error_type() == SSH_FX_EOF)
|
if (fxp_error_type() == SSH_FX_EOF)
|
||||||
break;
|
break;
|
||||||
printf("%s: reading directory: %s\n", fname, fxp_error());
|
printf("%s: reading directory: %s\n", fname, fxp_error());
|
||||||
|
|
||||||
|
req = fxp_close_send(dirhandle);
|
||||||
|
pktin = sftp_wait_for_reply(req);
|
||||||
|
fxp_close_recv(pktin, req);
|
||||||
|
|
||||||
sfree(ournames);
|
sfree(ournames);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user