]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Temporary fixed coredumps when isOpen() is called during shutdown cleanup.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 6 Sep 2011 20:14:29 +0000 (14:14 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 6 Sep 2011 20:14:29 +0000 (14:14 -0600)
For a permanent fix, we need to avoid deleting fd_table while it is still
in use by others, such as DeferredReads, possibly by allowing event loop
to run during shutdown.

src/comm.cc

index 5d40c6f3f5f2434c8ba57800edd699791343c48b..3fc3a65774c75a70bd6b37bab560cb362799bd1d 100644 (file)
@@ -106,7 +106,7 @@ fd_debug_t *fdd_table = NULL;
 bool
 isOpen(const int fd)
 {
-    return fd >= 0 && fd_table[fd].flags.open != 0;
+    return fd >= 0 && fd_table && fd_table[fd].flags.open != 0;
 }
 
 /**