mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-15 18:38:00 +08:00
Merge pull request #54 from hintjens/master
Backported fixes for LIBZMQ-464
This commit is contained in:
commit
ed9c7440d2
@ -283,7 +283,14 @@ bool zmq::msg_t::rm_refs (int refs_)
|
||||
|
||||
// The only message type that needs special care are long messages.
|
||||
if (!u.lmsg.content->refcnt.sub (refs_)) {
|
||||
close ();
|
||||
// We used "placement new" operator to initialize the reference
|
||||
// counter so we call the destructor explicitly now.
|
||||
u.lmsg.content->refcnt.~atomic_counter_t ();
|
||||
|
||||
if (u.lmsg.content->ffn)
|
||||
u.lmsg.content->ffn (u.lmsg.content->data, u.lmsg.content->hint);
|
||||
free (u.lmsg.content);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user