~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the variable 'bufused', which came over from winnet.c in
[sgt/putty]
/
unix
/
uxsftp.c
diff --git
a/unix/uxsftp.c
b/unix/uxsftp.c
index
f68685a
..
57f2841
100644
(file)
--- a/
unix/uxsftp.c
+++ b/
unix/uxsftp.c
@@
-565,6
+565,7
@@
char *ssh_sftp_get_cmdline(char *prompt, int no_fds_ok)
ret = ssh_sftp_do_select(TRUE, no_fds_ok);
if (ret < 0) {
printf("connection died\n");
ret = ssh_sftp_do_select(TRUE, no_fds_ok);
if (ret < 0) {
printf("connection died\n");
+ sfree(buf);
return NULL; /* woop woop */
}
if (ret > 0) {
return NULL; /* woop woop */
}
if (ret > 0) {
@@
-575,10
+576,12
@@
char *ssh_sftp_get_cmdline(char *prompt, int no_fds_ok)
ret = read(0, buf+buflen, 1);
if (ret < 0) {
perror("read");
ret = read(0, buf+buflen, 1);
if (ret < 0) {
perror("read");
+ sfree(buf);
return NULL;
}
if (ret == 0) {
/* eof on stdin; no error, but no answer either */
return NULL;
}
if (ret == 0) {
/* eof on stdin; no error, but no answer either */
+ sfree(buf);
return NULL;
}
return NULL;
}