1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-18 19:41:01 -05:00

Fix miscellaneous minor memory leaks.

All found by Coverity.
This commit is contained in:
Simon Tatham
2019-05-04 16:19:13 +01:00
parent e82ba498ff
commit 64fdc85b2d
6 changed files with 15 additions and 3 deletions

View File

@ -488,8 +488,10 @@ static int ssh_sftp_do_select(bool include_stdin, bool no_fds_ok)
for (fd = first_fd(&fdstate, &rwx); fd >= 0;
fd = next_fd(&fdstate, &rwx)) i++;
if (i < 1 && !no_fds_ok && !toplevel_callback_pending())
if (i < 1 && !no_fds_ok && !toplevel_callback_pending()) {
pollwrap_free(pw);
return -1; /* doom */
}
/* Expand the fdlist buffer if necessary. */
sgrowarray(fdlist, fdsize, i);