]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Removing the "state == NULL" assertion in comm_write().
authorwessels <>
Sat, 24 Feb 2001 02:42:36 +0000 (02:42 +0000)
committerwessels <>
Sat, 24 Feb 2001 02:42:36 +0000 (02:42 +0000)
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.

src/comm.cc

index 3ffde6f644a276528aabd85d8e960af0ca06357a..f332d1b7bd6be1020a1990ef906cd5dbe5cf94ea 100644 (file)
@@ -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;