mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
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
This commit is contained in:
parent
3831d77dba
commit
94eef608ae
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user