Skip to content

Commit

Permalink
fix double free error in PAIR socket
Browse files Browse the repository at this point in the history
  • Loading branch information
hurtonm committed Jun 19, 2010
1 parent cff7ba2 commit 2c3913b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pair.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2c3913b

Please sign in to comment.