Browse Source

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

Nick Mathewson 17 years ago
parent
commit
480db0f00a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/or/buffers.c

+ 2 - 2
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();