Fix several missing msg_t::close calls.

I traced memory leaks found using AddressSanitizer down to these.
This commit is contained in:
Brian Silverman
2015-07-21 19:42:20 -07:00
parent 3f70aca749
commit 18791f2bfb
4 changed files with 18 additions and 0 deletions

View File

@@ -229,6 +229,8 @@ int zmq::stream_t::xrecv (msg_t *msg_)
// Rather than sendig this frame, we keep it in prefetched
// buffer and send a frame with peer's ID.
blob_t identity = pipe->get_identity ();
rc = msg_->close();
errno_assert (rc == 0);
rc = msg_->init_size (identity.size ());
errno_assert (rc == 0);