mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-12 17:12:46 +00:00
Problem: XPUB leaks unprocessed metadata on close
Solution: dereference and delete any metadata object left in memory
This commit is contained in:
parent
b5a8825542
commit
821ab88f96
@ -59,6 +59,11 @@ zmq::xpub_t::xpub_t (class ctx_t *parent_, uint32_t tid_, int sid_) :
|
||||
zmq::xpub_t::~xpub_t ()
|
||||
{
|
||||
_welcome_msg.close ();
|
||||
for (std::deque<metadata_t *>::iterator it = _pending_metadata.begin (),
|
||||
end = _pending_metadata.end ();
|
||||
it != end; ++it)
|
||||
if (*it && (*it)->drop_ref ())
|
||||
LIBZMQ_DELETE (*it);
|
||||
}
|
||||
|
||||
void zmq::xpub_t::xattach_pipe (pipe_t *pipe_,
|
||||
|
Loading…
x
Reference in New Issue
Block a user