simple patch for trunk
Brad Fitzpatrick
brad at danga.com
Sat Apr 8 19:33:54 UTC 2006
Thanks! Committed.
Fortunately it has a very small window on start-up to effect people, as
buffers are only resized early on, and then stay at the same size for all
future connections (as the connection structures are reused)
How did you find this?
- Brad
On Sat, 8 Apr 2006, Torsten Foertsch wrote:
> otherwise r->rcurr can point to freed memory.
>
> --- memcached.c (revision 258)
> +++ memcached.c (working copy)
> @@ -949,7 +949,7 @@
> c->write_and_go = conn_closing;
> return 1;
> }
> - c->rbuf = new_rbuf; c->rsize *= 2;
> + c->rcurr = c->rbuf = new_rbuf; c->rsize *= 2;
> }
> res = read(c->sfd, c->rbuf + c->rbytes, c->rsize - c->rbytes);
> if (res > 0) {
>
> Torsten
>
More information about the memcached
mailing list