From d7f33c17ab74729708837628de938745aea0d933 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 17 Dec 2013 17:47:09 +0100 Subject: zmq input, fix memory leak --- src/dabInputZmq.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dabInputZmq.cpp b/src/dabInputZmq.cpp index e6f2f17..3efa044 100644 --- a/src/dabInputZmq.cpp +++ b/src/dabInputZmq.cpp @@ -144,8 +144,10 @@ int dabInputZmqReadFrame(dabInputOperations* ops, void* args, void* buffer, int } else { - memcpy(buffer, input->frame_buffer.front(), size); + char* newframe = input->frame_buffer.front(); + memcpy(buffer, newframe, size); etiLog.print(TcpLog::NOTICE, "inputZMQ got %d, %d\n", rc, input->frame_buffer.size()); + delete[] newframe; input->frame_buffer.pop_front(); return size; } -- cgit v1.2.3