mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-09 15:26:04 +00:00
Solution: explicitly set u.base.metadata to null
This commit is contained in:
parent
87e7ed054b
commit
34fe5eaf26
@ -239,6 +239,7 @@ int zmq::msg_t::close ()
|
||||
if (u.base.metadata->drop_ref ()) {
|
||||
LIBZMQ_DELETE(u.base.metadata);
|
||||
}
|
||||
u.base.metadata = NULL;
|
||||
}
|
||||
|
||||
// Make the message invalid.
|
||||
@ -393,8 +394,10 @@ void zmq::msg_t::set_metadata (zmq::metadata_t *metadata_)
|
||||
void zmq::msg_t::reset_metadata ()
|
||||
{
|
||||
if (u.base.metadata) {
|
||||
if (u.base.metadata->drop_ref ())
|
||||
if (u.base.metadata->drop_ref ()) {
|
||||
LIBZMQ_DELETE(u.base.metadata);
|
||||
}
|
||||
u.base.metadata = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user