1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-17 19:11:00 -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

@ -142,8 +142,10 @@ static int block_and_read(int fd, void *buf, size_t len)
ret = pollwrap_poll_endless(pw);
} while (ret < 0 && errno == EINTR);
assert(ret != 0);
if (ret < 0)
if (ret < 0) {
pollwrap_free(pw);
return ret;
}
assert(pollwrap_check_fd_rwx(pw, fd, SELECT_R));
}