From: wessels <> Date: Sat, 24 Feb 2001 02:42:36 +0000 (+0000) Subject: Removing the "state == NULL" assertion in comm_write(). X-Git-Tag: SQUID_3_0_PRE1~1589 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bedd962a2e2fc9c19387c1764217580a85e49552;p=thirdparty%2Fsquid.git Removing the "state == NULL" assertion in comm_write(). Previously, this assertion was always true because we used safe_free(state), but then state got MemPool-ified. Although we did NULL fd_table[fd].rwstate, we didn't NULL 'state'. The assertion is unneeded because fd_table[fd].rwstate will always be freed if it is set at the beginning of the function. --- diff --git a/src/comm.cc b/src/comm.cc index 3ffde6f644..f332d1b7bd 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.315 2001/01/12 00:37:16 wessels Exp $ + * $Id: comm.cc,v 1.316 2001/02/23 19:42:36 wessels Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -868,7 +868,6 @@ comm_write(int fd, char *buf, int size, CWCB * handler, void *handler_data, FREE memPoolFree(comm_write_pool, state); fd_table[fd].rwstate = NULL; } - assert(state == NULL); fd_table[fd].rwstate = state = memPoolAlloc(comm_write_pool); state->buf = buf; state->size = size;