When a buffer is destroyed with Buffer_free, only the original underlying buffer in 'buff' is freed, but not the reallocated buffer in 'data'. This patch fixes the problem.
The Reply data structure maintains a pointer 'data' to the beginning of the buffer containing the response. This pointer can become stale in case the buffer is reallocated in order to enlarge it. After the pointer is stale, segmentation faults or incorrect data reads are possible. This patch fixes the problem by storing a pointer to the Buffer data structure instead of the low-level byte array in Reply. As a consequence, abort errors are also modified to be stored in a Buffer.
…g on redis.so shared lib