Fix a file descriptor leak when connect() fails during a SOCKS4 proxy

connection attempt.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@242 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2013-06-18 11:00:12 +00:00
parent b26e295137
commit 2fc84d5f93
2 changed files with 4 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
[Changes 1.2c01] [Changes 1.2c01]
* Fix file descriptor leak on SOCKS4 connection failure found by
Coverity. (caf)
* Fix out-of-bounds error in cryptit() found by Coverity. (flashback) * Fix out-of-bounds error in cryptit() found by Coverity. (flashback)
* Cleanup save_formats(). (caf) * Cleanup save_formats(). (caf)

View File

@@ -343,6 +343,7 @@ int handle_socks(int fd, struct sockaddr_in addr, char *host, int portnum)
{ {
alarm(0); alarm(0);
bitchsay("Unable to connect to SOCKS4 proxy: %s", strerror(errno)); bitchsay("Unable to connect to SOCKS4 proxy: %s", strerror(errno));
close(fd);
return -1; return -1;
} }
alarm(0); alarm(0);