From 69355730a46d25d622db876b9da212c6f136ed5c Mon Sep 17 00:00:00 2001 From: bjovke Date: Tue, 27 Jun 2017 20:15:08 +0200 Subject: [PATCH] Problem: intermittent memory leak for req/rep send/recv. #2602 Solution: memory leak fixed. --- src/pipe.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pipe.cpp b/src/pipe.cpp index b70601b8..f7e94ed1 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -410,6 +410,8 @@ void zmq::pipe_t::terminate (bool delay_) // There are still pending messages available, but the user calls // 'terminate'. We can act as if all the pending messages were read. else if (state == waiting_for_delimiter && !delay) { + // Drop any unfinished outbound messages. + rollback (); outpipe = NULL; send_pipe_term_ack (peer); state = term_ack_sent;