diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2013-12-17 17:47:09 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2013-12-17 17:47:09 +0100 |
commit | d7f33c17ab74729708837628de938745aea0d933 (patch) | |
tree | 99bc605b6de500d2b91de113f1c021e1dc86a754 | |
parent | 89b617910c363dfc50d07f5dffc28989dc26b811 (diff) | |
download | dabmux-d7f33c17ab74729708837628de938745aea0d933.tar.gz dabmux-d7f33c17ab74729708837628de938745aea0d933.tar.bz2 dabmux-d7f33c17ab74729708837628de938745aea0d933.zip |
zmq input, fix memory leak
-rw-r--r-- | src/dabInputZmq.cpp | 4 |
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; } |