From 4631fde7e385ea31e85f41290614afb9bda391c9 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Wed, 16 Sep 2009 14:02:43 +0200 Subject: ZMQII-8: Failure during orphan pipe deallocation --- src/dispatcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dispatcher.cpp') diff --git a/src/dispatcher.cpp b/src/dispatcher.cpp index 530238d..6ac9fa2 100644 --- a/src/dispatcher.cpp +++ b/src/dispatcher.cpp @@ -100,8 +100,8 @@ zmq::dispatcher_t::~dispatcher_t () delete io_threads [i]; // Deallocate all the orphaned pipes. - for (pipes_t::iterator it = pipes.begin (); it != pipes.end (); it++) - delete *it; + while (!pipes.empty ()) + delete *pipes.begin (); delete [] command_pipes; -- cgit v1.2.3