From: robertc <> Date: Mon, 14 Oct 2002 15:34:29 +0000 (+0000) Subject: prevent segfault X-Git-Tag: SQUID_3_0_PRE1~657 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7194987f27c6d78ba4db59dbb9ab39f8fa4311be;p=thirdparty%2Fsquid.git prevent segfault --- diff --git a/src/http.cc b/src/http.cc index 2add703874..afbc9e5bb0 100644 --- a/src/http.cc +++ b/src/http.cc @@ -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(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(data); + assert (fd == httpState->fd); httpState->readReply (fd, buf, len, flag, xerrno, data); }