fix double free error in PAIR socket

This commit is contained in:
Martin Hurton 2010-06-19 19:46:35 +02:00
parent cff7ba2315
commit 2c3913bb19

View File

@ -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;
}