Commit 6436bc51 authored by evoskuil's avatar evoskuil

Problem: sub.xsetsockopt leaks message (0..n bytes) payload on fail.

parent 1b79da0d
......@@ -69,15 +69,8 @@ int zmq::sub_t::xsetsockopt (int option_, const void *optval_,
memcpy (data + 1, optval_, optvallen_);
}
// Pass it further on in the stack.
int err = 0;
rc = xsub_t::xsend (&msg);
if (rc != 0)
err = errno;
int rc2 = msg.close ();
errno_assert (rc2 == 0);
if (rc != 0)
errno = err;
return rc;
return close_and_return (&msg, rc);
}
int zmq::sub_t::xsend (msg_t *)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment