diff options
author | Martin Hurton <hurtonm@gmail.com> | 2010-06-19 19:46:35 +0200 |
---|---|---|
committer | Martin Hurton <hurtonm@gmail.com> | 2010-06-19 19:50:55 +0200 |
commit | 2c3913bb19fa95e7decaa7967e2469dc428e46b0 (patch) | |
tree | be8229abf7c06768575aef6a4a1e2084b5c0fe16 /src | |
parent | cff7ba2315c0f62fa3679afa24ecea88da38a365 (diff) |
fix double free error in PAIR socket
Diffstat (limited to 'src')
-rw-r--r-- | src/pair.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pair.cpp b/src/pair.cpp index 31524de..3872b28 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -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; } |