]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
[svn] Don't reference freed memory (fde_t) in comm_close().
authorjilles <redacted>
Mon, 5 Mar 2007 17:41:40 +0000 (09:41 -0800)
committerjilles <redacted>
Mon, 5 Mar 2007 17:41:40 +0000 (09:41 -0800)
ChangeLog
include/serno.h
libcharybdis/commio.c

index ed39c079d557d115b6a430beb92822d43ea740d8..00992216b20afdc62d89f8caec99ccb19c4093c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index b5d4f38d19dbd9f768ca009e5ae089a6bd63133a..24cb0bee4de9bd88acf68092239b3c6af8940c86 100644 (file)
@@ -1 +1 @@
-#define SERNO "20070305-3235"
+#define SERNO "20070305-3237"
index 4b397e1e6b055ee856a3dc6fda018a72446cfd8a..4dc50201e2207f851637522fc1383d52199239fb 100644 (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);
 }