diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-04-23 23:24:53 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-04-23 23:24:53 +0000 |
commit | 94eef608ae367c1b922a0831c979b2ff1f755a4f (patch) | |
tree | bb297a97192786932c55a2d8761dcf1e70cbd95f | |
parent | 3831d77dba07fdac0fe6c689fcfbada12c772ad8 (diff) | |
download | tor-94eef608ae367c1b922a0831c979b2ff1f755a4f.tar tor-94eef608ae367c1b922a0831c979b2ff1f755a4f.tar.gz |
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.)
svn:r10011
-rw-r--r-- | src/or/buffers.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 1d80f88ea..26a5b9683 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -468,6 +468,7 @@ buf_free(buf_t *buf) 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); |