Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/pipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,16 +359,18 @@ void zmq::pipe_t::process_pipe_term_ack ()
// First, delete all the unread messages in the pipe. We have to do it by
// hand because msg_t doesn't have automatic destructor. Then deallocate
// the ypipe itself.
upipe_t *const in_pipe = _in_pipe;
_in_pipe = NULL;

if (!_conflate) {
if (!_conflate && in_pipe) {
msg_t msg;
while (_in_pipe->read (&msg)) {
while (in_pipe->read (&msg)) {
const int rc = msg.close ();
errno_assert (rc == 0);
}
}

LIBZMQ_DELETE (_in_pipe);
delete in_pipe;

// Deallocate the pipe object
delete this;
Expand Down
Loading