[svn] Don't reference freed memory (fde_t) in comm_close().

This commit is contained in:
jilles 2007-03-05 09:41:40 -08:00
parent 61e3b8f276
commit df98bc52c8
3 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,12 @@
nenolod 2007/03/05 17:35:17 UTC (20070305-3237)
Log:
- fix for 100% cpu use
Changes: Modified:
+1 -1 trunk/libcharybdis/commio.c (File Modified)
nenolod 2007/03/05 17:31:35 UTC (20070305-3235)
Log:
- rework comm_checktimeouts() to use the hashtable in an efficient manner.

View file

@ -1 +1 @@
#define SERNO "20070305-3235"
#define SERNO "20070305-3237"

View file

@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: commio.c 3237 2007-03-05 17:35:17Z nenolod $
* $Id: commio.c 3239 2007-03-05 17:41:40Z jilles $
*/
#include "libcharybdis.h"
@ -801,6 +801,7 @@ comm_close(int fd)
}
comm_setselect(F->fd, FDLIST_NONE, COMM_SELECT_WRITE | COMM_SELECT_READ, NULL, NULL, 0);
comm_setflush(F->fd, 0, NULL, NULL);
F->timeout = 0;
if (F->dns_query != NULL)
{
@ -814,7 +815,6 @@ comm_close(int fd)
number_fd--;
comm_remove_fd(fd);
F->timeout = 0;
/* Unlike squid, we're actually closing the FD here! -- adrian */
close(fd);
}