From 9f868e9a4a0dfaa92ba2fec61c7566b0cf91380e Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Fri, 22 Aug 2014 10:54:12 +0200 Subject: [PATCH] Fix a use after free bug. --- arangod/Aql/ExecutionBlock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arangod/Aql/ExecutionBlock.cpp b/arangod/Aql/ExecutionBlock.cpp index 0cbe32d60a..dc9789a284 100644 --- a/arangod/Aql/ExecutionBlock.cpp +++ b/arangod/Aql/ExecutionBlock.cpp @@ -1256,13 +1256,13 @@ int FilterBlock::getOrSkipSome (size_t atLeast, else { // The current block fits into our result and is fresh and // takes them all, so we can just hand it on: + skipped += cur->size(); if (! skipping) { collector.push_back(cur); } else { delete cur; } - skipped += cur->size(); _buffer.pop_front(); _chosen.clear(); _pos = 0;