Commit 7d42aac0 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #1533 from c-rack/fix-tests

Problem: tests fail after PR #1531
parents 87e7ed05 34fe5eaf
...@@ -239,6 +239,7 @@ int zmq::msg_t::close () ...@@ -239,6 +239,7 @@ int zmq::msg_t::close ()
if (u.base.metadata->drop_ref ()) { if (u.base.metadata->drop_ref ()) {
LIBZMQ_DELETE(u.base.metadata); LIBZMQ_DELETE(u.base.metadata);
} }
u.base.metadata = NULL;
} }
// Make the message invalid. // Make the message invalid.
...@@ -393,9 +394,11 @@ void zmq::msg_t::set_metadata (zmq::metadata_t *metadata_) ...@@ -393,9 +394,11 @@ void zmq::msg_t::set_metadata (zmq::metadata_t *metadata_)
void zmq::msg_t::reset_metadata () void zmq::msg_t::reset_metadata ()
{ {
if (u.base.metadata) { if (u.base.metadata) {
if (u.base.metadata->drop_ref ()) if (u.base.metadata->drop_ref ()) {
LIBZMQ_DELETE(u.base.metadata); LIBZMQ_DELETE(u.base.metadata);
} }
u.base.metadata = NULL;
}
} }
bool zmq::msg_t::is_identity () const bool zmq::msg_t::is_identity () const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment