Project: Memcached

Revision: 784

Author: dormando

Date: 23 Jun 2008 00:05:08

Changes:

Fix freesuffix corruption.

When attempting to grow the freesuffix storage, the realloc is sized
to the number of bytes in freesuffixtotal instead of a number of
pointers of that size.

That is, the original malloc is for

sizeof(char *) * freesuffixtotal

but the realloc for growth was

freesuffixtotal * 2

On a 32-bit machine, this would have the effect of freeing half of
the freelist when an attempt was made to grow it.

The realloc is now consistent with the initial malloc.

Files:
modified: /trunk/server/memcached.c (try)
Diff: To list