diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-07-31 09:31:15 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-07-31 09:31:15 +0000 |
commit | 480db0f00ada1c7bd7d580324c1bd346b9028afa (patch) | |
tree | 7b862067da310156267a2dc5e4903694d0208580 | |
parent | ce8edc964cd6e05b2ba8e6604fe1285e93fa643e (diff) | |
download | tor-480db0f00ada1c7bd7d580324c1bd346b9028afa.tar.gz tor-480db0f00ada1c7bd7d580324c1bd346b9028afa.zip |
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
-rw-r--r-- | src/or/buffers.c | 4 |
1 files changed, 2 insertions, 2 deletions
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(); |