summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2013-12-17 17:47:09 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2013-12-17 17:47:09 +0100
commitd7f33c17ab74729708837628de938745aea0d933 (patch)
tree99bc605b6de500d2b91de113f1c021e1dc86a754 /src
parent89b617910c363dfc50d07f5dffc28989dc26b811 (diff)
downloaddabmux-d7f33c17ab74729708837628de938745aea0d933.tar.gz
dabmux-d7f33c17ab74729708837628de938745aea0d933.tar.bz2
dabmux-d7f33c17ab74729708837628de938745aea0d933.zip
zmq input, fix memory leak
Diffstat (limited to 'src')
-rw-r--r--src/dabInputZmq.cpp4
1 files changed, 3 insertions, 1 deletions
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;
}