summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-02-21 17:49:12 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-02-21 17:49:12 +0100
commit0eea93526d210372c23041d50f4b401a94e3a006 (patch)
treea2cfb725bb12e51628507666e39f3c24857038a8
parent5c0931121ba1854766599b6b7dbd1a7937febd6d (diff)
Fix for memory leak caused by long identities
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
-rw-r--r--src/zmq_init.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/zmq_init.cpp b/src/zmq_init.cpp
index 7fa04fc..afb4011 100644
--- a/src/zmq_init.cpp
+++ b/src/zmq_init.cpp
@@ -89,6 +89,8 @@ bool zmq::zmq_init_t::write (::zmq_msg_t *msg_)
peer_identity.assign ((const unsigned char*) zmq_msg_data (msg_),
zmq_msg_size (msg_));
}
+ int rc = zmq_msg_close (msg_);
+ zmq_assert (rc == 0);
received = true;