summaryrefslogtreecommitdiff
path: root/src/yqueue.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-12-01 19:09:58 +0100
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-12-01 19:09:58 +0100
commitcb84580bbced0b5d34ddcbac6e0aed5d0ad7cae6 (patch)
treebbc9daa3615b80dbb644ed4c89b73470e0400119 /src/yqueue.hpp
parent9bd309bda6522dfdd514dd0c4edae04322c83ed1 (diff)
harmless uninitialised memory read fixed
Diffstat (limited to 'src/yqueue.hpp')
-rw-r--r--src/yqueue.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/yqueue.hpp b/src/yqueue.hpp
index f20ac4c..f80af9c 100644
--- a/src/yqueue.hpp
+++ b/src/yqueue.hpp
@@ -60,11 +60,13 @@ namespace zmq
inline ~yqueue_t ()
{
while (true) {
+ if (begin_chunk == end_chunk) {
+ delete begin_chunk;
+ break;
+ }
chunk_t *o = begin_chunk;
begin_chunk = begin_chunk->next;
delete o;
- if (o == end_chunk)
- break;
}
}