From 480db0f00ada1c7bd7d580324c1bd346b9028afa Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 31 Jul 2007 09:31:15 +0000 Subject: r14034@catbus: nickm | 2007-07-31 05:22:56 -0400 possible fix for bug 473: always set buf->cur on buf_remove_from_front. svn:r11004 --- src/or/buffers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/or/buffers.c') diff --git a/src/or/buffers.c b/src/or/buffers.c index 3904b091ef..3af8af6caa 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -486,12 +486,12 @@ buf_remove_from_front(buf_t *buf, size_t n) if (buf->datalen) { buf->cur = _wrap_ptr(buf, buf->cur+n); } else { + buf->cur = buf->mem; if (IS_FREELIST_SIZE(buf->len)) { buf->highwater = 0; + if (add_buf_mem_to_freelist(buf)) return; - } else { - buf->cur = buf->mem; } } check(); -- cgit v1.2.3-54-g00ecf