Update ring_buffer.cpp

Leak memory found.