[Reconnoiter-devel] [reconnoiter commit] r1277 - trunk/src

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Thu May 6 09:01:02 EDT 2010


Author: jesus
Date: 2010-05-06 09:01:02 -0400 (Thu, 06 May 2010)
New Revision: 1277

Modified:
   trunk/src/noit_console.c
Log:
this code path was missing appropriate tear down, fixes #276

Modified: trunk/src/noit_console.c
===================================================================
--- trunk/src/noit_console.c	2010-05-05 16:00:08 UTC (rev 1276)
+++ trunk/src/noit_console.c	2010-05-06 13:01:02 UTC (rev 1277)
@@ -438,7 +438,9 @@
     len = e->opset->read(e->fd, sbuf, sizeof(sbuf)-1, &newmask, e);
     if(len == 0 || (len < 0 && errno != EAGAIN)) {
       eventer_remove_fd(e->fd);
-      close(e->fd);
+      if(ncct) noit_console_closure_free(ncct);
+      if(ac) acceptor_closure_free(ac);
+      e->opset->close(e->fd, &newmask, e);
       return 0;
     }
     if(len > 0) {
@@ -499,6 +501,10 @@
 }
 static int
 noit_console_logio_close(noit_log_stream_t ls) {
+  noit_console_closure_t ncct;
+  ncct = noit_log_stream_get_ctx(ls);
+  if(!ncct) return 0;
+  ncct->e = NULL;
   noit_log_stream_set_ctx(ls, NULL);
   return 0;
 }



More information about the Reconnoiter-devel mailing list