mirror of
https://github.com/zeromq/libzmq.git
synced 2025-02-20 22:31:34 +01:00
fix double free error in PAIR socket
This commit is contained in:
parent
cff7ba2315
commit
2c3913bb19
@ -115,6 +115,9 @@ int zmq::pair_t::xrecv (zmq_msg_t *msg_, int flags_)
|
||||
zmq_msg_close (msg_);
|
||||
|
||||
if (!alive || !inpipe || !inpipe->read (msg_)) {
|
||||
// No message is available. Initialise the output parameter
|
||||
// to be a 0-byte message.
|
||||
zmq_msg_init (msg_);
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user