]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
prevent segfault
authorrobertc <>
Mon, 14 Oct 2002 15:34:29 +0000 (15:34 +0000)
committerrobertc <>
Mon, 14 Oct 2002 15:34:29 +0000 (15:34 +0000)
src/http.cc

index 2add70387404ce2d76476f6135bbdef9788f5e84..afbc9e5bb001903f241db30d3a81dcd31d0d1ceb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.398 2002/10/14 08:47:47 hno Exp $
+ * $Id: http.cc,v 1.399 2002/10/14 09:34:29 robertc Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -66,7 +66,8 @@ httpStateFree(int fd, void *data)
 {
     HttpStateData *httpState = static_cast<HttpStateData *>(data);
 #if DELAY_POOLS
-    delayClearNoDelay(fd);
+    if (fd >= 0)
+       delayClearNoDelay(fd);
 #endif
     if (httpState == NULL)
        return;
@@ -558,6 +559,7 @@ static void
 httpReadReply(int fd, char *buf, size_t len, comm_err_t flag, int xerrno,void *data)
 {
     HttpStateData *httpState = static_cast<HttpStateData *>(data);
+    assert (fd == httpState->fd);
     httpState->readReply (fd, buf, len, flag, xerrno, data);
 }