apache/thrift — pull request #37 by KuldeepGupta04 (2013-07-18 08:16:20+00:00)
Title: Update TBufferTransports.cpp

In void TMemoryBuffer::ensureCanWrite(uint32_t len)
Storage is returned from allocation function "realloc(void *, size_t)".
Assigning: "new_buffer" = storage returned from "realloc(this->buffer_, new_size)".
Variable "new_buffer" going out of scope leaks the storage it points to.
so deleting the new_buffer and releasing memory.