[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r10011: Avoid another assert failure in the new buffer memory code. (in tor/trunk: . src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r10011: Avoid another assert failure in the new buffer memory code. (in tor/trunk: . src/or)
- From: nickm@xxxxxxxx
- Date: Mon, 23 Apr 2007 19:24:56 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Mon, 23 Apr 2007 19:25:06 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: nickm
Date: 2007-04-23 19:24:53 -0400 (Mon, 23 Apr 2007)
New Revision: 10011
Modified:
tor/trunk/
tor/trunk/src/or/buffers.c
Log:
r12784@Kushana: nickm | 2007-04-23 19:24:09 -0400
Avoid another assert failure in the new buffer memory code. (This time, it hit when freeing a 4k buffer with some data on it.)
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r12784] on c95137ef-5f19-0410-b913-86e773d04f59
Modified: tor/trunk/src/or/buffers.c
===================================================================
--- tor/trunk/src/or/buffers.c 2007-04-23 22:20:45 UTC (rev 10010)
+++ tor/trunk/src/or/buffers.c 2007-04-23 23:24:53 UTC (rev 10011)
@@ -468,6 +468,7 @@
assert_buf_ok(buf);
buf->magic = 0xDEADBEEF;
if (buf->len == MIN_LAZY_SHRINK_SIZE) {
+ buf->datalen = 0; /* Avoid assert in add_buf_mem_to_freelist. */
add_buf_mem_to_freelist(buf);
} else if (buf->mem) {
oldmem = RAW_MEM(buf->mem);